Senegal claimed the 16th and final place in the men's Olympic football tournament with a deserved 2-0 victory over Oman in an entertaining play-off match at the City of Coventry Stadium.
Abdoukarime Diouf's side have qualified for the main tournament for the first time and join fellow African teams Gabon, Morocco and Egypt in Tuesday's draw for the group stage at Wembley Stadium, London.
Ibrahima Balde scored with a header in the second minute and it looked as though that would be the only goal of the contest until Abdoulaye Sane settled any Senegal nerves with a neat finish in the final minutes.
For most of the opening half, Senegal looked certain to extend their advantage against opponents who occasionally played pretty football but lacked a cutting edge.
However, after the break Senegal seemed uncertain whether to push home their advantage or defend their lead and they had to endure several uncertain moments as Oman came close to equalising.
Team GB coach Stuart Pearce was in the stands as he checked out potential group-stage opponents, while Senegal-born Patrick Vieira and former Teranga Lions international El-Hadji Diouf were also in attendance.
Oman's Wigan keeper Ali Al-Habsi was another interested spectator but it was an unconvincing attempt from compatriot Omer Al-Abri to collect a free-kick from the right that allowed Balde to head home from six yards.
Sadio Mane almost doubled the lead with a shot that flew narrowly wide from 20 yards.
And Moussa Konate, Ibrahima Seck, Kalidou Yero and Balde all threatened Al-Abri's goal before the break as Oman struggled to cope with their physically imposing opponents.
Senegal deployed a 4-2-3-1 formation and frequently unsettled Oman with swift and skilful attacks, looking to work the ball into wide areas as often as possible.
The smallish but vocal Oman support had precious little to cheer in the opening half but Mohamed Al-Maashari went close with an audacious strike from long range.
And just before English referee Howard Webb brought the opening 45 minutes to an end, Hussain Al-Hadhri had a penalty appeal turned down after his shot was blocked.
It was a much more even contest after the restart, with Oman twice going close to an equaliser.
First Kara Mbodji almost deflected Waleed Al-Saadi's cross into his own net and then Mohammed Al-Balushi went agonisingly close from a tight angle.
But Senegal remained a threat on the break and sealed their Olympic qualification in the final minutes when substitute Sane slotted beyond Al-Abri after he had been played clean through.