Nigeria's Olumide Oyedeji, left, celebrates with teammate Derrick Obasohan after the team defeated the Dominican Republic 88-73 during a third place basketball game of the Olympic qualifier in Caracas, Venezuela, Sunday, July 8, 2012. Nigeria qualified to the London Olympics. (Photo: AP)
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.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO Sportsand on Facebook at AhramOnlineSports)