Once he passed Nakagami, Rabat pulled away to win by .7 seconds, with pole-sitter Scott Redding finishing on the podium. Espargaro and Dominique Aegerter rounded out the top five.
“I was just passing them one at a time,” Rabat said. “I’m happy to get the win.”
Nakagami said he was disappointed with not winning, but his second place ride was the best of his career.
“The tires started to go away,” he said. “I didn’t have the power to pull away.”
Pole-sitter Alex Rins took the lead from teammate Alex Marquez entering Turn 1 on the final lap to win the Moto 3 race.
Marquez had used a similar move the prior lap to grab the point, but Rins was not to be denied. It was his third win of the 2013 season.
Rins, Marquez and Maverick Vinales pulled away from the rest of the field and battled for the top three positions throughout the 23-lap race.
The three riders swapped the top spot eight times during the race after Arthur Sissis jumped from the sixth starting position to lead the first lap.
Jack Miller, running sixth at the time, crashed in Turn 2, going over the steering fork. Miller was carried from the track on a stretcher, suffering a broken collarbone in the crash.