Updated

Fernando Alonso from Ferrari extended his lead in the Formula One world championship standings by winning Sunday's German Grand Prix with a superb performance at the Hockenheim circuit.

Alonso started on the pole and relinquished the lead briefly in the 67-lap race when he made his first pit stop. The Spaniard had to fend off challenges from Red Bull's Sebastian Vettel and McLaren's Jenson Button, but he finished 3.7 seconds ahead of the field to claim his season-high third win and the 30th of his F1 career.

"We enjoyed the race," Alonso said. "We were competitive yesterday (qualifying) in wet conditions, and today, starting on pole, I think was the key factor, because it was difficult to overtake. We were maybe not the fastest, but we kept the position."

It's the second time in three years Alonso has won the German GP. When this race was last contested on this 2.842-mile, 17-turn course in 2010, his win was surrounded in controversy. Felipe Massa was robbed of a potential victory after his Ferrari team instructed him to move aside and allow his teammate, Alonso, to take the lead with 20 laps remaining. Massa finished second in that event.

Vettel and Button each took turns in challenging Alonso for the lead, trailing him by less than one second at certain times.

Alonso and Vettel pitted for final time on lap 42. Alonso came out first, while Button, who made his last stop one lap earlier, squeezed into second as Vettel was returning to the track.

Vettel passed Button and reassumed the second position during the penultimate lap. But race stewards investigated Vettel's maneuver when he drove off the track while overtaking Button in the hairpin.

Stewards later determined that Vettel gained an advantage on Button after he ran off the track at the exit of the hairpin. They elected to give Vettel a drive-through penalty, which when imposed after the race, meant 20 seconds was added to his finishing time.

Vettel crossed the finish line 3.7 seconds behind Alonso, but after his penalty was assessed, he was demoted from second place to fifth.

"At the end of the race, Jenson's tires were gone, and I was able to close the gap again," Vettel said. "It was then a question of when, rather than where, and I tried to outbreak him. He opened the break again and then was up the inside. I wasn't sure where he was. I couldn't see him in that moment, so I decided to give enough space and went off line on the slippery paint, and I was able to stay ahead and get past him.

"The only intention was not to crash and to give him enough room. I have respect for him, and I didn't want to squeeze him. It was good to be on the podium at the home race, but I have to respect the steward's decision."

Vettel, who hails from nearby Heppenheim, Germany, has yet to win a grand prix in his home country.

Button was elevated from third to second in the finishing order. He made his first podium appearance since finishing second in the April 15 Chinese Grand Prix. Button, who won the season-opening Australian Grand Prix, has struggled since China.

"Sebastian Vettel's pass was a pretty straight forward matter," he said. "The rules state that you can't go off the track to gain an advantage. The thing is, there would have been more opportunities for him before the end of the race, as my rear tires were damaged. That's because I had to push hard to try and catch Fernando Alonso, which meant I had nothing left for the end of the race."

Button's McLaren teammate, Lewis Hamilton, had a disappointing finish in his 100th career F1 start. Hamilton suffered a puncture in his left-rear tire after running over debris in the opening laps. He later retired with a 24th- place result.

"I saw the debris come up and it damaged (the tire)," he said. "The car felt terrible after that, and the rear floor was damaged."

Hamilton won last year's German GP, which was held at the Nurburgring circuit.

Lotus' Kimi Raikkonen finished third, while Kamui Kobayashi placed fourth, and his Sauber teammate, Sergio Perez, sixth.

Michael Schumacher from Mercedes crossed the line in seventh, followed by Red Bull's Mark Webber, who won the most recent grand prix two weeks ago in Silverstone, England. Nico Hulkenberg from Force India and Schumacher's teammate, Nico Rosberg, completed the top 10.

Alonso, a two-time world champion, has now accumulated 154 points for the season. Webber is a distant 34 points behind Alonso, while Vettel, the two- time defending F1 titleholder, trails by 44.