Takuma Sato scored a landmark win for Japanese motor racing Sunday, becoming the first driver from his country to win the Indianapolis 500.

The 40-year-old Sato, who made the jump from Formula One to IndyCar in 2010, edged the race's three-time champion Helio Castroneves for the victory after starting fourth from the grid. Rookie Ed Jones was third.

The previous best at the Indy 500 by a Japanese driver was Toranosuke Takagi's fifth place in 2003. Sato had never fared better than 13th in 2013 and 2015 in "The Greatest Spectacle in Racing," and his only other IndyCar win came in 2013, when he won at Long Beach.

"Unbelievable feeling," said Sato, who, in tradition, doused himself with a bottle of milk and got a huge hug from team owner Michael Andretti. "It was obviously a tough, tough race. Helio drives really fair so I can trust him, I can really come from the outside.

Motor racing: Sato becomes 1st Japanese to win Indy 500

"Fantastic, fantastic race. I hope the crowd enjoyed it."

Sato had come close to winning the Indy 500 once before in 2012, when he crashed on the final lap trying to beat Dario Franchitti. Sato, who joined Andretti Autosport from this season, overtook Castroneves with five laps to go and held off the Brazilian by 0.2 seconds for the win.

"This time I was pointing in the right direction, wasn't I?" the Tokyo native said, referring to the 2012 race. "It's beautiful. I dreamed of something like this."

"Until three laps to go, I didn't know. When Helio came side by side with three laps to go, that was the moment you've got to go for it, run it flat. And we did it and we pulled away."

Sato became the only Japanese driver to have reached the podium in both IndyCar and Formula One. He came in third in Formula One at the 2004 U.S. Grand Prix when he was with BAR Honda.

Sato accomplished Sunday's feat 26 years after the first Japanese drove at Indianapolis Motor Speedway, where Hiro Matsushita -- the grandson of the late Panasonic founder Konosuke Matsushita -- took a crack at the race.

Sato dedicated the triumph to his fans back home.

"This victory is beyond big," he said. "I can't even imagine how this will go down in Japan. There were some people who came over all the way from Japan for this."

"I was able to give them a fantastic result, and I'm so proud of this win which we achieved as a team. I hope all those who suffered from the earthquake and tsunami in eastern Japan are able to take some joy from this," he said, referring to the March 2011 disaster.