Togo's 2-0 win against Algeria in the African Nations Cup on Saturday helped keep their last eight chances alive and sealed Ivory Coast's qualification from Group D amid some farcical scenes in Rustenburg.
The game will be remembered for the Togo goalframe collapsing three minutes from time that prompted a 13-minute delay after Algeria's Adlene Guedioura had crashed into the net from failing to win a header.
There was three minutes left of play and around three or four minutes of injury time to be added on when the players resumed play, but the referee, Hamada Namplandraza of Madagascar, somehow added on 13 minutes.
It left some baffled onlookers fearing he had included the time the players were OFF the park which is sure to interest the game's authorities. It would certainly have sparked major controversy if a dominant Algeria side had equalised in stoppage time.
Fortunately for the credibility of the tournament and the referee, Dove Wome raced clear to sink the clinching goal on the break three minutes into 13 minutes added on.
Emmanuel Adebayor, for so long the central figure in Togo's footballing fortunes, put his pre-tournament troubles behind him.
Adebayor's 32nd minute strike not only helped seal Algeria's fate as the first side to be eliminated after two defeats, it also sent Ivory Coast into the quarter-finals as Group D winners.
Togo's second goal in the second minute of stoppage time from substitute Wome clinched the victory late into the night after the match was halted for 13 minutes while a phalanx of men battled to straighten a leaning goalpost.
The win was only Togo's third in 19 matches in the finals and their first since the trauma of the Cabinda incident in Angola in 2010 when two members of their entourage were killed when gunmen attacked their bus.
Togo withdrew from those finals and did not qualify for last year's tournament in Gabon and Equatorial Guinea. They opened this tournament with a 2-1 defeat to Ivory Coast, but this victory puts them within touching distance of the last eight.
After two matches Ivory Coast lead the standings with six points, Togo and Tunisia have three and Algeria have none. Togo and Tunisia meet on Wednesday to decide who goes through with the Ivorians, who face Algeria.
While the 2-0 win was a triumph for Togo, it was a personal success too for Adebayor as he was left out of Didier Six's original squad but was brought in after the French coach was overruled by the FA president who ordered him to include the talismanic striker.
He made up for missing what should have been a certain goal in the second minute of their opening match against Ivory Coast, with an emphatic finish against Algeria after breaking free of the defence and firing low past keeper Rais Mbolhi.
The goal came against the run of play as Algeria had dominated the opening half-an-hour with the clever Sofiane Feghouli pulling the strings.
However none of their attempts produced a goal and with time running out Wome ran on to a loose ball and fired home the second to bring a long, emotional and at times farcical night to a close.
Algeria, despite having the second-best FIFA ranking (22) of all 16 teams in the tournament behind favourite Ivory Coast (14), flattered to decive in both games they played.
Algeria were also denied two clear-cut penalties in the second half that could have handed them the chance to equalise, but the referee decided otherwise.
Togo's match against Tunisia on Wednesday will decide who goes through alongside tournament favourites Ivory Coast, who play Algeria.