World Championship leader Franceso Bagnaia returned from a serious accident seven days ago to push winner Jorge Martin all the way at the San Marino Grand Prix.
The Italian claimed third place on the podium but Martin has closed in on his lead.
It came after he avoided serious injury in a crash last week, which saw fellow rider Brad Binder run over his legs.
Bagnaia sits 36 points clear of Martin, who beat second placed Marco Bezzecchi.
The Ducati rider fought off a brave late charge from Dani Pedrosa, while Martin won from pole after breaking the lap record by half a second in qualifying.
"I was pushed by the fact that I wanted to do a good race for the fans," said Bagnaia.
"I was destroyed after half the race. Happy with the result, it wasn't easy considering the situation."
Martin, who completed a double for the weekend after winning a sprint race on Saturday, admits it is "big" to beat Italian riders in their home race.
"Winning here in Italy, in front of the Italian guys, that's big," he said.
"With Marco and Bagnaia it was going to be really tough. I tried to stay in front for all the laps and as soon as I saw a bit of a gap I started pushing like hell."
Painkillers were required to help Bagnaia complete the race, while Bezzecchi was carrying a wrist injury from the Catalunya Grand Prix last Sunday.