Aleix Espargaro won the Catalunya MotoGP sprint race at Montmelo on Saturday.
World champion Francesco Bagnaia took second to extend his lead in the riders' standings with Maverick Vinales completing the podium.
Bagnaia, who had claimed pole on his factory Ducati with a record lap time in qualifying, got off to his usual speedy start.
Vinales jumped from fourth to second by turn one.
The Aprilia rider's teammate Espargaro, on his local track, quickly had the Italian's measure.
With the circuit covered by cloud, Espargaro ate into Bagnaia's lead. The gap was down to under two tenths of a second with three of the 12 laps completed.
As Espargaro's brother Pol crashed out, the leading pair began to pull clear of the chasing pack headed by Vinales.
Espargaro, born a few kilometres from the Barcelona track, nipped past Bagnaia at the halfway stage, quickly pulling half a second clear.
The Aprilia rider, who had lit up Friday's practice, was not to be denied in front of his local fans.
He crossed the line over two seconds in front to follow up his win in the British Grand Prix at Silverstone.
The win also helped erase the memory of his embarrassing slip-up last year.
Setting off from pole, he was running second to Fabio Quartararo when he celebrated making the podium one lap early.
By the time he realised his mistake three riders had passed him and he finished in fifth.
With the slogan "One more lap" painted on his helmet on Friday, he made amends in style on Saturday, with Sunday's main event to come.
nr/pb