The statement, carried by the official news agency APS on Wednesday, named Abdelaziz Belkhadem, who has served as President Abdelaziz Bouteflika's personal representative and held the rank of minister, as the new prime minister.
The move was widely expected ahead of parliamentary elections next year and after Ahmed Ouyahia, the outgoing prime minister, failed to attend formal ceremonies for visiting leaders in recent days.
Algerian newspapers had predicted Ouyahia's departure amid a political struggle between Bouteflika's National Liberation Front (FLN) and Ouyahia's Democratic National Rally (RND).
The FLN, which dominates the parliament, had threatened to topple Ouyahia through a no-confidence vote in parliament if he did not resign or Bouteflika did not fire him.
Criticised over poverty
The FLN accuses Ouyahia of not moving fast enough to tackle social issues such as widespread unemployment and poverty.
Ouyahia was due this week to address parliament to defend his political record, but speaker Amar Saadani, a senior FLN official, told the daily al Khabar on Wednesday: "We see no necessity for him (Ouyahia) to come to the parliament."
Wednesday's statement from the president's office did not name the outgoing premier, apparently underlining the political tension between the Bouteflika camp and Ouyahia.
Ahmed Ouyahia's departure was
expected in Algeria (file)
Ouyahia had stood firm in the face of demands by politicians, media and trade unions to raise wages, arguing the economic climate was not healthy enough.
Commentators said the FLN, which is also represented in the government under Ouyahia, wants to focus on social issues ahead of elections and distances itself from the previous government, criticised for failing to solve the country's troubles despite soaring oil prices.
Ouyahia, 54, became the youngest Algerian prime minister when he was first appointed in 1995. He is widely respected for his management skills.
He quit late in 1998 before returning to lead the government in mid-2003 until his departure again on Wednesday.
Local commentators said his departure heralded a split of the country's political landscape into camps ahead of the 2007 parliamentary polls.
Ouyahia's RND formed an alliance with the FLN and moderate Islamists to cement support for Bouteflika's policy, which focuses on restoring peace after more than a decade of violence in which more than 150,000 people were killed.
Algeria plunged into violence early in 1992 when the authorities scrapped parliamentary polls that a now-banned radical Islamist party was poised to win.
Commentators said the departure of Ouyahia, whose secularist views clashed with his Islamist and conservative partners in the government he led, would be a loss for the anti-Islamist camp and a gain for the conservatives who cement their alliance with moderate Islamists.
"The presidential alliance is changing into a coalition between Islamists and conservatives," said the influential el Watan daily in a commentary.
Belkhadem said he was consulting other political groups to form a new government soon.