The move came after Algerian President Abdelaziz Bouteflika sacked Prime Minister Abdelmadjid Tebboune on Tuesday, less than three months after appointing him.
Algeria's presidency has recalled veteran crisis manager Ahmed Ouyahia as prime minister, a job he first held in the 1990s when Algeria was battling an insurgency.
Ouyahia, 65, will replace Abdelmadjid Tebboune, who held the job for just three months, the office of President Abdelaziz Bouteflika said on Tuesday.
Ouyahia will likely be seen as a steadying influence as Algeria tries to carry out economic adjustments to cope with a fall in oil prices that has slashed state revenues.
The presidency statement gave no reason for the change. Ouyahia has served three terms as prime minister and most recently was Bouteflika's chief of staff.
A veteran politician and diplomat by training, Ouyahia first became prime minister in the mid-1990s, when Algeria was fighting to suppress an insurgency.
He is also leader of the National Rally for Democracy, a party close to the presidency that increased its number of seats in May's parliamentary election.
The North African state's political system is often opaque, and Bouteflika, 80, has rarely been seen in public since suffering a stroke in 2013. Under the constitution, the president appoints the prime minister.
Political jostling around Bouteflika has intensified as his health has waned, fuelling questions about the shape of any transition if he steps down before his term ends in 2019.
Moves to reduce subsidies and imports and diversify Algeria's oil-dependent economy have created political divisions over how far to push reforms.
As prime minister Tebboune was leading the austerity drive, and had also spoken out about the need to separate money from politics.
In the run up to Tebboune's dismissal, there was media speculation that he had fallen out of favour because of differences with Ali Haddad, a prominent businessman close to the presidency.
Tebboune was also perceived to be encroaching on foreign policy, seen as a preserve of the presidency, after he held a meeting with French Prime Minister Edouard Philippe earlier this month, said one senior source who spoke to Reuters on condition of anonymity.
"My loyalty to the president remains complete," Tebboune said after his dismissal.