Ferrari made a triumphant return to the 24 Hours of Le Mans after a 50-year absence on Sunday.
The celebrated Italian constructor won the centenary edition to foil Toyota's hunt for a sixth successive win in motorsport's fabled endurance classic.
Alessandro Pier Guidi was at the wheel of Ferrari's No.51 car to take the chequered flag of a race first run in 1923 in front of a sell-out 300,000 crowd at the Bugatti circuit.
Italian Pier Guidi shared driving duties with his compatriot and former Formula One driver Antonio Giovinazzi and Briton James Calado.
Toyota's No.8 car, victorious 12 months ago, came in second with Cadillac in third and fourth.
With less than two hours to go after the leaders had played cat and mouse overnight Toyota's Ryo Hirakawa was within striking distance of the red rival only for the Japanese driver to make a hash of braking at a bend to hit a barrier.
A costly mistake that involved a lengthy pit stop assured Ferrari of their tenth win in the premier Hypercar class but first in 58 years.
"It's a great achievement after so long - this will go down in history," said Calado.
For Toyota there was disappointment mixed with pride at playing their part in a memorable battle.
"We gave it our all," said New Zealand's Brendon Hartley, who shared the Toyota wheel with Hirakawa and Swiss Sebastien Buemi.
Hartley's heart went out to Hirakawa.
"An accident could happen to any of us, full support to Ryo," he said.
- 'Under pressure' -
Hartley, a three-time Le Mans winner, added: "The last few stints I did were the best I've done.
"We had to put them (Ferrari) under pressure - we threw everything at them."
The 62 cars across all classes were sent on their way 24 hours earlier by NBA legend LeBron James.
Toyota had won the last five editions but new regulations to the premier Hypercar class attracted several new and old constructors to throw their hats into the Le Mans ring.
And it was one of the Japanese marque's new rivals Ferrari, that secured pole position in qualifying on Friday.
Buemi's Toyota battled in the night in the top category with Giovinazzi in the Ferrari.
If Buemi was often in the lead, Giovinazzi hung on and overtook the Toyota shortly after dawn thanks to faster refuelling, with Cadillac remaining in touch.
Rain showers had made part of the Sarthe circuit slippery, upsetting the strategy of many teams.
Three podium hopefuls had to give in during the night including the Toyota No.7 of Kamui Kobayashi, victorious in 2021, who pulled out after a collision.
For the past five years, both Toyotas have always finished the race.
The second Ferrari then lost half an hour in the pits due to damage to eventually finish in fifth.
In all there were 16 Hypercars vying for the win in the Le Mans centenary compared to only five last year - but despite Ferrari on pole Toyota had remained favourites to notch up their sixth successive win after cleaning up in the first three rounds of the world endurance championship.
In the end they had to settle for second, but only after pushing Ferrari to the absolute limit after over 4,500 kilometres of hard driving.
hdy/fcc/nr/ea