Brazil's Helio Castroneves won a record-tying fourth Indianapolis 500 on Sunday in front of 135,000 spectators, in what was the largest sporting event staged since the start of the coronavirus pandemic.

Castroneves -- who also won in 2001, 2002 and 2009 -- joined US legends AJ Foyt, Al Unser Sr and Rick Mears as four-time champions over 200 laps at the famed 2.5-mile (4km) Indianapolis Motor Speedway oval.

A sellout crowd -- with capacity reduced to 40 percent as a Covid-19 safety precaution by local officials -- watched Castroneves hold off Spain's Alex Palou over the final laps to take the victory at age 46.

"I love Indianapolis," Castroneves said. "The fans, they give me energy. This is absolutely incredible."

Brazil's Helio Castroneves won his fourth Indianapolis 500, tying the all-time record
Brazil's Helio Castroneves won his fourth Indianapolis 500, tying the all-time record GETTY IMAGES NORTH AMERICA / Stacy Revere

Castroneves passed Palou on the first turn of the penultimate lap, then kept him at bay as they came upon slower cars on the final lap before taking the checkered flag to capture the fastest Indy 500 in history in 2hrs 37mins 19.3846secs.

"Right now, I'm just excited," said Castroneves.

"I knew I was going to get a fight. I put the elbows out. It was incredible. I still got it, don't you think?"

A tearful Castroneves continued his "Spider-Man" tradition, established in his earlier triumphs, by climbing the safety fence along the outside of the front straightaway as spectators roared with delight.

Helio Castroneves won his fourth Indianapolis 500 at age 46
Helio Castroneves won his fourth Indianapolis 500 at age 46 GETTY IMAGES NORTH AMERICA / Stacy Revere

Once he descended, rivals and legends congratulated him, including iconic driver Mario Andretti, and Castroneves' crew shared a joyful embrace.

Palou was the runner-up by 0.4928 of a second with France's Simon Pagenaud third, edging Mexico's Pato O'Ward.

Helio Castroneves and Spain's Alex Palou traded the lead several times in the Indianapolis 500
Helio Castroneves and Spain's Alex Palou traded the lead several times in the Indianapolis 500 GETTY IMAGES NORTH AMERICA / Stacy Revere

Castroneves, who made his 21st Indy 500 start from the middle of the third row, celebrated his accomplishment as the latest in a series of wins by golden oldie sports champions that included 43-year-old Super Bowl champion quarterback Tom Brady and 50-year-old PGA Championship winner Phil Mickelson.

"Tom Brady won the Super Bowl. Phil Mickelson won the PGA. The old guys still got it," Castroneves said.

"We're still kicking the young guys' butt. We'll teach them a lesson. We've still got it."

Castroneves, who had raced at Indy for 20 years on the Roger Penske Racing team, won this time on a special one-off entry from upstart Meyer Shank Racing.

"No one ever gave up. They gave me an incredible car and we did it," said Castroneves. "It's not the end of it. It's the beginning."

Helio Castroneves kisses the bricks at the finish line after winning the Indianapolis 500
Helio Castroneves kisses the bricks at the finish line after winning the Indianapolis 500 GETTY IMAGES NORTH AMERICA / ANDY LYONS

Palou took the lead with 38 laps remaining with Castroneves just behind him, and the two exchanged the lead over the final laps as the tension mounted.

Castroneves seized the lead with seven laps remaining but Palou passed the South American on the front straight with five laps to go, setting the stage for the last dramatic Castroneves pass.

"I didn't let him past but once you get a good run, there's nothing you can do," Palou said.

"It hurts to finish second. But we'll be back stronger. It's only my sixth or seventh race on an oval."

Palou, 28th last year in his Indy 500 debut, took his only IndyCar victory in this year's opener at Alabama.

Palou took the lead in the IndyCar season points series with 248 to 212 for previous leader Scott Dixon, a six-time series champion from New Zealand who finished 17th after starting from the pole.

At the start, Dixon grabbed the lead in the first turn but American Colton Herta passed him in the third turn to lead the opening lap. Dutchman Rinus VeeKay passed them both to seize the lead after the second lap.

Britain's Stefan Wilson crashed on lap 24, locking his brakes on pit row and hitting the pit side of the inside straightaway wall to bring out caution flags.

VeeKay and Herta had just refueled but Dixon needed an emergency stop and ran out of fuel, coasting into the pits. His car wouldn't refire quickly, putting him a lap down.

The situation allowed Castroneves to refuel under caution and that kept him near the front after American Graham Rahal crashed, losing his left rear wheel exiting the pits.

When a restart came with 74 laps remaining, Castroneves zipped past Palou for the lead and the two carried their fight for the lead to the finish.

Fans were asked to wear masks and practice physical distancing at the Brickyard, according to the venue's website, though many were seen without face coverings.