Sierra Leone's veteran striker Kei Kamara missed a late penalty to scupper their chances of reaching the next round of the Africa Cup of Nations as they lost 1-0 to Equatorial Guinea on Thursday.
Pablo Ganet's 38th-minute strike ensured Equatorial Guinea finished second in Group E and progressed, but Sierra Leone might have gone through as one of the best third-placed finishers if they had forced a draw.
- Stream ESPN FC Daily on ESPN+ (U.S. only)
- Don't have ESPN? Get instant access
They were awarded a last-minute penalty, but Kamara's effort was saved by Equatorial Guinea's 20-year-old goalkeeper Jesus Owono.
The result also means the Comoros Islands are through as one of the best third-placed finishers after their surprise 3-2 win over Ghana on Tuesday.
Equatorial Guinea finished the first round with a second successive win and six points, one behind group winners Ivory Coast.
Sierra Leone were third on two points with defending champions Algeria bottom of the standings.
"To come second in this strong group is a real achievement for us," Equatorial Guinea captain Carlos Akapo said.
Gannet struck at the end of a clever corner routine as the Sierra Leone defence backed off and allowed him to thrash the ball home from the edge of the penalty area.
Sierra Leone needed to score to stay in the tournament but struggled with fatigue and created few chances before substitute Issa Kallon was bought down.
Sierra Leone celebrated the awarding of the penalty as if they had scored, but watched in horror as Kamara's effort was saved by Owono.
The match ended seven minutes into stoppage time when Equatorial Guinea's Iban Salvador was given a penalty after being tripped in the final attack of the game, but the referee changed the decision to a free kick on the edge of the area after several minutes' delay on the advice of VAR.
Equatorial Guinea have now gone through to the knockout stages in all three of their tournament appearances and will meet the winners of Group F, to be decided later on Thursday, in Limbe next Wednesday.
"The penalty miss is difficult to take, it could have changed everything for us," Sierra Leone coach John Keister said.