SAITAMA, Japan, August 27 (Ticker) -- Germany breathed a sigh of relief after Ime Udoka missed a major opportunity to help his team pull off a major upset.

Dirk Nowitzki scored 23 points and played a key defensive role on Udoka's final shot at the buzzer as Germany advanced to the quarterfinals of the World Championship with a 78-77 victory over Nigeria.

Coming off a 47-point outing in Thursday's triple-overtime victory over Angola, Nowitzki made 7-of-18 shots from the floor and grabbed nine rebounds. However, the Dallas Mavericks' star forward missed a jumper with 14 seconds left, which led to Nigeria's final opportunity.

With time running out, Udoka raced up the floor and into the lane before lofting a shot over Nowitzki's outstretched arms. The ball bounced off the backboard and the rim before Ademola Okulaja grabbed the rebound to seal the win for Germany (5-1).

"I was just hoping he was going to miss it," Okulaja said of Udoka's last shot. "Dirk was contesting it well. I got the rebound so I'm really happy about it."

"It was a hard-fought game and came down to the last second," Nigeria forward Ekene Ibekwe said. "I'm just really proud of my teammates coming this far. ... This is something people see, for the future of Nigerian basketball is something to come."

Okulaja, who was born in Nigeria and moved to Germany when he was three years old, scored 19 points on 7-of-12 shooting and had eight rebounds.

Although Germany managed to escape with the close victory, coach Dirk Bauermann is hoping for a better overall effort in the next round against either the United States or Australia.

"We are not just a one-man team," Bauermann said. "Dirk didn't have a great game today and when you're able to beat a team like Nigeria on a day Dirk isn't playing well, that's a good sign for us."

Ibekwe scored 22 points on 9-of-13 shooting and grabbed 10 rebounds for Nigeria (2-4), which shot just 59 percent (19-of-32) from the foul line and committed 26 turnovers.