Gabon have won their first ever continental title, with a 2-1 victory over Morocco in the final of the African U23 championship.
Both teams had already qualified for the Olympic Games, so Saturday's match was all about the U23 crown.
All the goals came in the first half and the match became increasingly bad tempered as Gabon wasted time late on.
The victory will be a major boost to Gabon, who co-host the Africa Cup of Nations in January next year.
Each side had a man sent off, although Gabon's red card was in stoppage time at the end of the game.
africa's olympic qualifiers
- Gabon - champions
- Morocco - runners-up
- Egypt - third place
- Senegal face a play-off with an Asian team to decide if they will go to London
Morocco opened the scoring on 22 minutes when Younes Mokhtar fired home an angled shot into the bottom right hand corner of the Gabonese goal.
15 minutes later Gabon, who have surprised many with their achievements here, were level thanks to a powerful strike into the roof of the net from Landri Obiang Obiang.
And just before the break, Allen Nono headed home a free-kick to put the underdogs in front and silence the viciferous home crowd, who had finally turned out in numbers.
The second-half was a much more niggly affair, and Morocco's cause was badly damaged when their goalkeeper, Younes El Kharroubi, was sent off for a challenge on Nono outside the area.
Gabon had chances to extend their lead after that but could not find another way through - instead they had Didier Ndong sent off late on.
Both he and El Kharroubi may miss the first match at the London Games because of their red cards.