All the action from Sunday's second quarter-final at the African Cup of Nations.
Major goalflashes and incidents (all times GMT):
1835: The referee blows for full-time, and Morocco have reached the semi-final. Algeria exit the tournament, having surprised many by going so far in the competition. The Desert Foxes will rue the fact that they were ninety seconds away from winning this quarter-final before Morocco's late equalising goal in normal time. Morocco will play Mali in Wednesday's semi-final in Sousse.
1832: GOAL Morocco 3-1 Algeria
Zairi takes possession down the right flank, cuts inside, beating Gaouaoui who has rushed out to try to tackle him, and sidefoots into an empty net from just inside the penalty area. A cool finish from the Moroccan forward who opens his account at Tunisia 2004.
1830: Zafour fires a hopeful volley high and wide of the Moroccan goal from 25 yards out. The Algerian team look very demoralised - and have not been helped by the actions of their fans in the stands. Many who had come to support the Desert Foxes have abandoned the stadium, while others have thrown objects onto the pitch - prompting local police to enter the stands to keep quiet.
1829: Zairi almost scores Morocco's third but Gaouaoui stops the striker's shot which is hit hard and low from a tight angle. The ball spills across the face of goal but there is no Moroccan player to knock it into an empty net.
1827: As Algeria look for an eqauliser, Morocco counter-attack but when Mokhtari finds Zairi unmarked in the box the 21-year-old striker simply falls over the ball when he has a clear shooting opportunity.
1826: Algeria win a corner. which Fouhami fists clear. Algerian fans stream out of the stadium following Morocco's goal.
1824: GOAL Morocco 2-1 Algeria
Substitute Youssef Hadji picks up the ball just outside the penalty area, turns away from his defender as he storms into the penalty area and squeezes the ball past Gaouaoui from close range. A very good individual goal.
1820: The second period is also a very tight affair, with neither side yet to create a shooting opportunity.
1817: Algeria kick off the second period of extra-time.
1815: The first period of extra-time, notable only for Yahia's drive, comes to an end.
1814: The fourth official signals one minute of stoppage time at the end of the first period of extra-time.
1813: The game has quietened down considerably as both teams concentrate on not making a mistake that could cost their side the game.
1808: Antar Yahia hits the side netting with a rising strike from 20 yards that misses the goal by inches. Some of the Algerian fans in the stadium roar in celebration as they mistakenly believe the ball has hit the back of Fouhami's goal.
1805: Morocco start the first period the brighter. Meanwhile, Algeria make another substitution as Brahim Zafour comes on for Mamar Mamouni.
1759: Morocco get the first period of extra-time underway. Jamal Alioui has replaced Kharja for the Atlas Lions.
1753: The referee blows to end the 90 minutes, and the last of the quarter-finals is the only one that will need extra-time. 30 minutes of extra-time will be played, and there is no golden goal.
1751: GOAL Morocco 1-1 Algeria
Four minutes into stoppage time, Chammakh keeps his cool as a cross into the Algerian box finds him unmarked at the back post and he slips the ball past Gaouaoui with the outside of his right foot from seven yards. Good work from Yaacoubi down the left set up the goal.
1749: Ouaddou wins a free header six yards from goal from a Moroccan free-kick but his attempt goes straight at Gaouaoui in the Algeria goal.
1748: The fourth official signals five minutes of added time at the end of the match.
1747: Fouhami makes a terrific one-handed save, diving to his left, to deny Cherrad his second goal as the Algerian striker hits a stinging volley from the edge of the Moroccan D. A mistake from Morocco's Houcine Kharja gave Cherrad a free run at goal.
1746: Algerian fans are whistling for the referee to bring the match to an end.
1744: Smoke billows across the pitch from the number of flares that have been lit by the Algerian fans in the stands.
1744: Youssef Hadji replaces El Karkouri as Morocco boss Badou Zaki makes another change.
1743: Chammakh hits the Algeria post from eight yards, having rounded the keeper after being set up by Yaacoubi in a quick reply from Morocco.
1741: GOAL Morocco 0-1 Algeria
Algeria score from their first attack of the second half, as Abdelmalek Cherrad heads home a right-wing cross from Hocine Achiou which deflected into his path off El Karkouri. Flares light up the Sfax skyline as Algerian fans celebrate.
1741: The untidy game continues to be littered with fouls.
1737: Gaouaoui surges from goal to clear a hopeful punt upfield from Morocco, but Kharja's header over the keeper fails to reach the goal and the ball is put behind for a corner.
1735: As with so much in this game, the corner comes to nothing and Algeria clear.
1734: Morocco win a corner following persistent play down the right from Mokhtari. Algeria make a substitution as Nassim Akrour replaces Boutabout.
1732: Safri chips a ball into the back post but Mokhtari fails to keep his header down as Morocco look for the winner.
1731: Moroccan substitute Yaacoubi is shown the yellow card for his foul on Algerian substitute Ziani.
1730: Kraouche assumes the Algerian captaincy in Belmadi's absence.
1729: Algeria make their first change as Desert Foxes captain Belmadi is replaced by Karim Ziani.
1727: Regragui crosses into the box, Chammakh plays the ball back to Zairi who shoots inches wide of Gaouaoui's left-hand post.
1726: Moroccan manager Badou Zaki makes his first change of the match, bringing on Mohamed Yaacoubi for Abdelkrim Kissi.
1722: Nasreddine Kraouche becomes the third Algerian to go into the referee's notebook as he is shown a yellow card for his poor challenge on El Karkouri.
1721: Mokhtari volleys over the bar from the edge of the box following a flick-on from Zairi.
1720: Algerian forward Cherrad is booked for kicking the ball away after the forward was blown up for offside.
1718: El Karkouri fires over the bar from twelve yards when it seemed easier to score. The Moroccan defender scuffed his first attempt after the ball broke clear to him near the penalty spot with Gaouaoui on the floor, yet the second attempt was, if anything, even worse as he shot wildly over the bar with the whole goal at his mercy.
1714: Algeria win a free-kick in a dangerous position as Mansour Boutabout is felled by El Karkouri near the penalty spot. As Fouhami clears Belmadi's ball in, the referee decides to give a free-kick in Morocco's favour although it is unclear why as there appeared to be no foul on the Moroccan keeper.
1710: Mokhtari snaps in a strike from a tight angle on the left-hand side of the penalty area that Gaouaoui gets down low to his left to save. The numerous Algerian fans in the stands try to lift their team with their singing and through the lighting of red flares.
1709: Play is held up as Walid Regragui is stretchered off the pitch in some pain.
1707: Belmadi puts his own keeper under real pressure with an underhit backpass, but Gaouaoui reaches the ball a split-second before Moroccan forward Marouane Chammakh can take it off his toes.
1705: Algeria's Antar Yahia misses the chance of the match as he fails to put a free header from Belmadi's free-kick on target when unmarked just six yards from goal.
1703: Algeria kick off the second half.
1648: The corner goes straight to Gaouaoui, whereupon the referee blows for half-time to bring to an end a disappointing half. There has been a real shortage of goalmouth action and creativity.
1647: Morocco win a corner.
1646: Yazid Mansouri fires wildly over the bar from 30 yards after Djamel Belmadi set him up with a low pass.
1645: The fourth official signals two minutes of stoppage time at the end of the first half.
1639: With just seven minutes to half-time, Morocco win the first corner of the match.
1638: Moroccan keeper Khalid Fahoumi takes an important cross from Djamel Belmadi with an Algerian free at the back post should Fahoumi have missed it.
1637: Moroccan defender Talal El Karkouri curls the resulting free-kick just a foot over the bar.
1635: Zairi is lucky to be awarded a foul 30 yards from the Algeria goal after appearing to lose possession. Algerian defender Yazid Mansouri is booked for taking his protests too far.
1634: Ouaddou is penalised for his challenge on Gaouaoui, as both players contest a free-kick knocked deep into the Algerian penalty area.
1631: Hocine Achiou curls a free-kick into the Moroccan box with a lot of Algerian players having come forward but Achiou's delivery fails to beat the first man.
1627: Mokhtari hits a snapshot from the left-hand edge of the Algerian penalty area that dribbles wide of Gaouaoui's left-hand post.
1626: Morocco are beginning to knock the ball around nicely, but have yet to get behind the Algerian defence. The two North African rivals know each other's game very well and this clearly shows.
1622: Zairi fires in Morocco's first shot of the game from just outside the penalty area, but the ball goes wide of the right-hand post of Algeria keeper Lounes Gaouaoui.
1621: Play is still very congested in midfield as both sides look to settle into their game.
1620: A bottle is thrown onto the pitch by a spectator, but quickly removed.
1614: Youssef Mokhtari is booked yet it appears that the referee has shown a yellow card to the wrong man. Youssef Safri was the player fouling his Algerian opponent.
1612: Neither side has yet to create an opening nor force either keeper into a serious save.
1610: Algeria's Nasredine Kraouche fires a free-kick from distance harmlessly over the bar of Morocco goalkeeper Khalid Fouhami.
1608: Morocco's Abdeslam Ouaddou is booked for his foul on Abdelmalek Cherrad.
1607: Algerian defender Salim Aribi is booked for his clattering challenge on Zairi.
1605: Morocco forward Jaouad Zairi has the ball in the back of the net but the goal is disallowed for offside.
1604: The match gets off to a slow beginning, and play is held up as Algeria captain Djamel Belmadi receives treatment.
1600 GMT: Morocco get the last of the four Cup of Nations quarter-finals underway in Sfax.
Morocco make only one change to the team that drew 1-1 with South Africa in their final Group D game.
Striker Marouane Chammakh starts his third game of the tournament, at the expense of Youssef Hadji who drops out.
The Atlas Lions will be looking to 21-year-old Jaouad Zairi for creativity and goals.
Algeria coach Rabah Sadane makes seven changes to the team that lost 2-1 against Zimbabwe in the Desert Foxes' final Group C game.
Samir Beloufa and Antar Yahia come into defence, at the expense of Brahim Zafour and Moulay Haddou.
In midfield, Djamel Belmadi, Mamar Mamouni and Yazid Mansouri return while Mansour Boutabout and Abdelmalek Cherrad are preferred in attack.
Fodil Hadjadj, Karim Ziani and Samir Zaoui drop out of midfield, while Nassim Akrour and Fares Fellahi exit the forward line.
Morocco: 1-Khalid Fouhami; 4-Abdeslam Ouaddou, 6-Noureddine Naybet (captain), 5-Talal El Karkouri; 2-Walid Regragui, 8-Abdelkrim Kaissi, 15-Youssef Safri, 16-Youssef Mokhtari, 13-Houcine Kharja; 7-Jaouad Zairi, 17-Marouane Chammakh
Algeria: 12-Lounes Gaouaoui; 4-Samir Beloufa, 5-Salim Aribi, 21-Antar Yahia; 6-Yazid Mansouri, 8-Nasredine Kraouche, 10-Djamel Belmadi (captain), 22-Hacine Achiou, 19-Mamar Mamouni; 11-Mansour Boutabout, 7-Abdelmalek Cherrad
Referee: Shelmani Abdul Kakim (Libya)