(CNN) -- World champion Valentino Rossi capped his remarkable return to the MotoGP circuit by taking fourth place behind Dani Pedrosa in his first race since breaking his leg six weeks ago.
Spaniard Pedrosa on a Honda came in clear of Rossi's Yamaha teammate Jorge Lorenzo in the German round of the championship at Sachsenring.
Former world champion Casey Stoner pipped Rossi for the final place on the podium in a thrilling finish.
Australian Stoner on a Ducati only came past the nine-time world champion on the last corner to deny the 98,000 spectators the sight of Rossi collecting the third place trophy on crutches.
The Italian ace shrugged off his physical impediment and said he was racing for his own satisfaction.
"It was easier with a broken leg, and very comfortable from a psychological perspective, because I was there to enjoy myself as I'm no longer in contention for the championship," he told the official MotoGP website.
Earlier, the race was stopped by a three-bike crash which left French rider Randy de Puniet with a double leg fracture.
The restart saw a shortened 21-lap race which gave Pedrosa the chance to register his second win of the season and cut Lorenzo's lead in the title race.
"When they stopped I wasn't sure about the restart. When you stop and restart it's never the same thing, but for me it was good," he said.
Lorenzo had to settle for the runner-up spot, conceding that his compatriot was faster on the day.
"Pedrosa got more pace than me, it was impossible to follow him. He's done a splendid race, so I'm happy with second place, it's very positive for the championship."
But much of the focus was on Rossi, who suffered a broken tibia in a crash at Mugello 42 days ago, and was expected to be ruled out for the rest of the season.
He has missed four rounds to effectively derail his hopes of defending his crown, but his battle with old rival Stoner kept the massive crowd enthralled.
"I did the best I could this afternoon. I thought Valentino was going to get me but I dragged everything I could out of my bike to get past him," admitted Stoner.
Lorenzo leads the standings with 185 points, 47 points ahead Pedrosa with Rossi in sixth place on 74.