Porsche won the Le Mans 24 Hours race for the second year in a row as Toyota just missed out on a first victory because of a last-lap power failure.
At one point Toyota's Kazuki Nakajima was 90 seconds clear but the Japanese reported a problem with under five minutes left and eventually stopped.
It handed victory to the number two Porsche shared by Neel Jani, Roland Dumas and Marc Lieb.
The number six Toyota car crossed for second, with Audi's number eight third.
British driver Anthony Davidson, who was partnered with Nakajima in number five Toyota, tweeted: "I literally have no words."
He added: "Kazuki on the radio as he crossed the line: 'I'm ready to cry guys.' Don't worry mate. I was already there. I'm proud of my team-mates for putting up such a fight. We almost had it, but congrats to Porsche."
Toyota would have become only the second Japanese manufacturer to win the race, after Mazda in 1991, but instead finished as runners-up for the fifth time.
"What can I say? First of all I feel sorry for the boys down in the other garage," said Porsche's Lieb. "They deserved this, they were giving us a hard time as well.
"This race should have had two winners, it was really unbelievable."