Turning Point: Germany trailed 68-65 with less than three minutes to go and were outscored 9-3 the remainder of the way.
Game Hero: Spain's Marc Gasol had a game-high 24 points.
Stats Don't Lie: Spain's Pau Gasol failed to score in the first half but finished with 19 points. Germany out-rebounded Spain 39-33.
This website requires a Adobe Flash plug-in. Please download the latest version of the Flash plug-in by clicking here
Spain didn't have it all their own way but still managed to beat Germany 77-68 on Wednesday in Vilnius.
In the first game of the second round, Spain got 24 points from Marc Gasol, 19 from his brother Pau - all in the second half - and 14 from captain Juan Carlos Navarro.
"We did everything that we could to make life as difficult for Spain," Germany coach Dirk Bauermann said.
"We are satisfied with our performance."
Spain were able to open up a nine-point lead but Germany did a good job of controlling the tempo from start to finish and never allowed the defending champions to pull away.
Down 52-43 with 5:29 to go in the third quarter after a Pau Gasol basket, Germany went on a 12-3 run capped by a Dirk Nowitzki jumper to finish the frame.
Then at the start of the fourth, and guarded by Serge Ibaka, Nowitzki caught a pass on the low block and banked in a fade-away jump shot over Ibaka to put Germany in front, 57-56.
Fortunately for Spain, Caja Laboral's Fernando San Emeterio is in the squad for the second straight year.
He replied with a lay-up and then made two free-throws before Rudy Fernandez soared in for a basket and a 62-57 Spanish advantage.
Germany managed to close the gap to 66-63 on a drive by Heiko Schaffartzik and again at 68-65 after two free-throws by Chris Kaman.
But Spain had the luxury of going to their tall, talented frontline.
Pau Gasol was fouled by Nowitzki and sank both free-throws and then a steal by Ricky Rubio sucked the life out of the Germany attack.
Germany point guard Steffen Hamann was trying to make a pass to the right wing when Rubio reached in and picked it off, triggering a fast-break that ended with a foul on Marc Gasol.
He made two free-throws for the 72-65 lead with 2:06 remaining.
Germany cut the deficit to 74-68 with 34 seconds to go after a three-ball by Robin Benzing, who spent much of the game on the bench in foul trouble.
But Dirk Bauermann's team got no closer.
"I thought that in the fourth quarter we had a couple of opportunities but we either missed a shot or turned the ball over," Bauermann said.
"The turnovers hurt us as we had five in the first half but we had too many in crucial moments in the second half and fourth quarter.
"Ricky had a big steal. (But) We played solid."
Spain coach Sergio Scariolo breathed a sigh of relief after the game.
"Germany never gave up and it was a physical game," he said.
"We weren't able to break away and Germany did a good job on defensive transition to stop us from making fast breaks."
The loss for Germany has dropped them to 0-3 in Group E and now they'll be looking at games coming up against Turkey and Lithuania and clashes they must win in order to advance to the Quarter-Finals.
Spain are in much better shape at 2-1.
Germany player Sven Schultze:
"It was a really tough game. The Spanish team really play for each other. We gave them a hard fight and we had our chances. Now, we just have to keep our heads up for the last two matches. For me, it is great to be in Vilnius as I have been here before. It's a nice Arena and the Lithuanian fans are great."
Germany Head Coach Dirk Bauermann:
"There were a number of times in the game when we could have possibly got over the hump but we either turned the ball over or missed a shot. It was unfortunate because if we could have taken a lead just that one team then Spain would have been under some pressure but it never happened. Our guys played hard and stuck to the plan but it was just too bad we couldn't win the basketball game. We played exceptionally well against Italy, we played very well against Serbia at times and today we played well for 40 minutes so I think we have a great chance to win against Turkey. They are extermely strong but we have already beaten them twice recently and I think we can beat them again."
Spain player Ricky Rubio:
"It was a hard game. Germany were very aggressive and we couldn't run as we like to do. I thought we defended well in the final quarter, especially in the last five minutes of the game to get the win."
Spain Head Coach Sergio Scariolo:
"It was a physical game and Germany didn't give up. We weren't able to get a big run and pull away. I thought we did a good job on Dirk Nowitzki and Chris Kaman. Our defense was ok. Now we have two days to recover and get ready for Serbia."