Libya beat Gabon 4-2 on penalties to reach the semi-finals of the 2014 Chan tournament where they will play Zimbabwe.
The otherwise lacklustre encounter had finished 1-1 after extra time and during the penalty shoot-out at Peter Mokaba Stadium which witnessed drizzling showers, Libya scored all their penalties while Gabon missed two.
Sunday's first quarter-final encounter was in stark contrast to swashbuckling two matches that were played at Cape Town Stadium on Saturday involving Morocco, Nigeria, Zimbabwe and Mali that witnessed a total of 10 goals.
Gabon were the first to create a real chance when Romuald Ewouta missed a clear cut opportunity in the second minute when he prised open a static Libyan defence but failed to beat goalkeeper Mohamed Abdaula.
Gabon goalkeeper, Yves Bitseki Moto was then forced to cut a menacing cross in the eighth minute in Libya's firs sniff at goal.
Libyan defender Motasem Sabbou then handled just outside the box but Samson Mbingui's ferocious free kick cannoned off the upright in the 12th minute.
Libya's reply was swift but striker Almoatasembellah Mohamed sliced his shot agonisingly wide when it looked easier to score than miss.
Franck Engonga then earned himself a yellow card for bringing down Libyan striker Ahmed Almaghasi but the resultant free-kick went well wide giving Moto little problems as both sides started to fashion out a few chances.
However, there were no clear-cut chances as both teams seemed contend to go to the break sharing a goalless draw.
In the second half, it was Libya who looked more dangerous and they duly took the lead in the 50th minute through Abselsalam Omar whose delicate chip found Moto, in goals for Gabon, at sea.
Talented Bonventure Taty then weaved his way past a number of Libyan defenders but his final product was disappointing as Gabon tried to reply immediately.
In the 72nd minute, Libyan defender Abdelrahman Fetori brought down Lionel Yackouya inside the box and Daniel Cousin made no mistake from the spot to bring parity in the game.
Cousin could have made the match safe for the tiny Central African country in the 86th minute but saw his header saved by Mohamed Abdoula in goals for Libya.
That was the last chance of normal time as the two sides went into extra time.
Substitute Mohamed Ghanudi could have given Libya the lead but his powerful shot came off the cross bar as the North Africans smelt blood in the first period of extra time.
Libya finished stronger and Fetori was again denied by Moto as the North Africans ended the extra time asking probing questions as penalties started to loom.