(CNN) -- World champion Jorge Lorenzo trimmed the lead of this season's MotoGP pacesetter Dani Pedrosa with his second successive race victory on Sunday, overcoming scorching hot conditions in Spain.
Pedrosa had set a lap record in Saturday's qualifying for the Catalunya Grand Prix, but was upstaged from the start by his fellow Spaniard and had to settle for second place as he spent most of the race holding off his rookie Honda teammate Marc Marquez.
Lorenzo followed up his victory in Italy two weeks ago as the Yamaha rider moved to within seven points of Pedrosa after his third triumph in the sixth of 18 races on the 2013 calendar.
The 26-year-old from Mallorca also won at Montmelo last year, and in 2010 when he went on to clinch his first world title in motorcycling's elite class.
"To be honest I didn't expect to win," Lorenzo said after registering his 26th career victory, putting him seventh on the all-time list.
"I knew I had some chance, but not like in Mugello where I was more convinced we could get the victory. It was really difficult physically as it was the hottest race of the year. I kept pushing 100% all race because any mistake would have been a disaster.
"Because I was tough mentally and never gave up, I could open up a little gap in the last five laps that was enough to win."
Pedrosa, who is from the city of Sabadell in Catalonia province, has now been runner-up three times in his home race, which he won in 2008.
"I had to ride a defensive race for most of it as Marc was really attacking me," Pedrosa said.
"It was not a perfect race for me as I was never close enough to Jorge to pass him. It's not a good feeling from this race but still I am relieved to be in the overall lead."
Marquez, who started sixth on the grid, bounced back from his crash-ruined weekend at Mugello as he claimed his fifth podium position this season to stay third in the championship -- 30 points behind Pedrosa.
Seven-time world champion Valentino Rossi returned to form with fourth place, having failed to finish his home event in Italy after finishing 12th in France the previous race.
"Race by race, apart form the unlucky times especially like Mugello, we grow up and I am able to ride the bike in a better way," he said.
"We still have some challenges, especially in the first part of the race where I still don't have the right setting to push to the maximum."
Germany's Stefan Bradl was fifth on a Honda ahead of Britain's Bradley Smith -- who achieved a career-best finish for Monster Yamaha Tech 3 -- and Ducati's Andrea Dovizioso.
Spain's Aleix Espargaro was eighth for Aprilla while U.S. veteran Colin Edwards was ninth on a Kawasaki ahead of Italian Michele Pirro on another Ducati.
Monster Yamaha Tech 3's Cal Crutchlow had started from second on the grid, but the British rider crashed out on the 10th lap along with Ducati's former world champion Nicky Hayden to be among eight retirements.