Gabon became only the fourth hosts to exit the Africa Cup of Nations at the group stage after a 0-0 draw with Cameroon, who reach the quarter-finals.
Pierre-Emerick Aubameyang missed a great chance for Gabon early on when he bundled the ball wide from two yards.
His team-mate Denis Bouanga brought saves from Fabrice Ondoa as Gabon poured forward in the early stages.
Bouanga was denied a last-gasp winner, that would have put Gabon through, when his shot crashed back off the post.
The rebound sat up perfectly for Didier N’Dong but his shot was pushed over the bar brilliantly by Cameroon goalkeeper Ondoa as he was picking himself up the floor.
Gabon went into the game knowing they had to win to guarantee their qualification from Group A but they go out of the competition after three draws.
Burkina Faso are the other quarter-finalists from the group after they beat debutants Guinea-Bissau 2-0, a result which put them top of the table above Cameroon by goal difference.
Borussia Dortmund star Aubameyang, one of the most prolific strikers in world football, will now have another painful memory from the Nations Cup to add to his crucial penalty miss in 2012 that cost his side a place in the semi-finals.
He will replay over and over the moment in this match when he somehow got his feet tangled and put the ball wide of a gaping goal when trying to convert Bouanga’s low cross to the back post.
After their fast start did not bring a goal, Gabon’s belief and confidence drained.
They lacked the guile and creativity to break Cameroon down and they created virtually nothing until that late drama.
The Indomitable Lions were little better in what was a poor match and were unable to put Gabon out of their misery earlier, coming closest through an Ambroise Oyongo shot that clipped the post and a first-half header from Adolphe Teikeu that went narrowly wide.
But Cameroon have a chance to improve, while Gabon must face up to their poor performances.