Algeria forward Riyad Mahrez curled in a free kick in stoppage time to give Algeria a 2-1 win over Nigeria in a tense Africa Cup of Nations semi-final played in a volatile atmosphere on Sunday.
The Algerians went ahead when William Troost Ekong turned a Mahrez cross into his own net five minutes before halftime.
Nigeria equalised out of the blue midway through the second half with a penalty awarded for handball and converted by Odion Ighalo following a lengthy VAR review.
There were ugly scenes as bottles were thrown after the equaliser. Algeria will face Senegal in Friday's final.