Nigeria seized the last men's basketball berth at the London Olympics with an 88-73 victory over the Dominican Republic in a last-chance game at the FIBA qualifying tournament.
Nigeria had shocked favorites Greece in the quarter-finals, but were beaten in the semi-finals on Saturday by Russia -- who booked their own place with that win.
Lithuania had also secured a spot on Saturday with a victory over the Dominican Republic, leaving Nigeria and the Dominicans to play one last contest for the third and final berth still up for grabs.
Ike Diogu, a 10-year NBA veteran who was with the San Antonio Spurs last season before a spell with the Chinese Basketball Association's Xinjiang Flying Tigers, led Nigeria with 25 points and 10 rebounds.
"I'm very happy. We did what had to be done," Diogu said. "We knew we were going to face teams that are heavyweights, and we did what we needed to do - win."
Nigeria, ranked 21st in the International Basketball Federation (FIBA) world rankings, had 14 points from Al-Farouq Aminu, who plays for the New Orleans Hornets in the NBA.
Yack Martinez led the Dominican Republic, coached by University of Kentucky coach John Calipari, with 16 points.
Nigeria and Lithuania will play in group A in the preliminary round in London, along with the 2008 gold medallists the United States, Argentina, France and Tunisia.
Russia booked a berth in group B, which includes Spain, Brazil, Australia, China and hosts Great Britain.