Wilfried Bony scored twice to take Ivory Coast into the semi-finals of the Africa Cup of Nations.
The new Manchester City striker headed the Elephants in front from a right-wing cross by Max Gradel.
Hilal Soudani equalised for Algeria against the run of play early in the second half and then forced goalkeeper Sylvain Gbohouo into a brilliant save.
Gbohouo was rewarded when Bony headed in Yaya Toure's free-kick and Junior Tallo set up Gervinho for a late third.
The margin of victory flattered Ivory Coast in what was an even contest and before former Arsenal striker Gervinho confirmed the result on the break, they had been under pressure from Algeria.
Their defence seemed all over the place at times and semi-final opponents DR Congo will have taken note.
Algeria, in the quarter-finals for the first time since 2010, made the brighter start to the contest and almost went ahead in the ninth minute.
Yacine Brahimi raced into the left-hand side of the penalty area and the Elephants' defence failed to deal with his cross, allowing Soudani to get in a shot which was well held by Gbohouo.
Ivory Coast boss Herve Renard was ordered by the referee to put a bib over his white shirt as it clashed with Algeria's kit
In the 21st minute, Riyad Mahrez volleyed over from close range but then Ivory Coast hit back.
Two minutes later, Gradel floated in a free-kick from the left and Serge Aurier's downward header hit the base of the post and then in the 26th minute they took the lead.
Gradel was again involved as he delivered a testing cross from the right and Bony escaped the defence to head home from eight yards.
Bony shot wide from distance towards the end of the first half before at the other end, Saphir Taider's sharp volley was confidently saved by Gbohouo.
The start of the second half mirrored the start of the first with one team dominating but the other one scoring.
This time Ivory Coast were the team who started on top but a comedy of errors in their defence after a deep cross into their penalty area finally saw the ball fall to Soudani, who fired it home.
Algeria goalscorer Hilal Soudani plays his club football for Dinamo Zagreb
That sparked a spell of dominance from the Desert Foxes with Gbohouo twice having to clear his lines before he made an amazing 66th minute save from Soudani's point-blank effort.
The momentum changed and two minutes later Bony restored Ivory Coast's lead when he climbed highest to head Yaya Toure's set-piece inside the near post.
Algeria piled on the pressure in the closing stages but could not find an equaliser and Gervinho finished them off when he passed the ball into the net.
Latest Stories
-
Ghanaian Para-Delegate honoured at World Para camp in South Korea
3 mins -
Alan receives massive support in Volta Region as residents welcome him ahead of Dec. 7 election
8 mins -
Deloitte Partner Yaw Lartey to speak at Oxford Africa Business Forum
14 mins -
Bawumia’s government will invest heavily in Agriculture – Ahiagbah
18 mins -
Resorting to electoral violence is inimical, it must be avoided at all costs – Peace Council Chair
22 mins -
I pledge to ensure peace before, during, and after the December polls – EC Chair
29 mins -
Signing of peace pact will amount to nothing without genuine commitment – Mahama
35 mins -
We cannot run for our lives if chaos erupts – PWDs plead for peaceful election
41 mins -
“Don’t give us any honeymoon” – Awuah Darko urges Ghanaians to hold NDC accountable
1 hour -
You either don’t read or understand economic data – Bawumia replies Mahama
2 hours -
Swiatek accepts one-month doping suspension
2 hours -
“I react to criticism with a lot of applause” – Stonebwoy
2 hours -
UCC elects Abraham Norman Nortey as 62nd SRC President
2 hours -
“My goal is to get my music all over the world, not just nominations” – Stonebwoy
2 hours -
Ghanaian youngster Gabriel Quartey set to sign for Danish side AaB
2 hours