There were both joy and sadness at the conclusion of this year's Le Mans 24 Hours as Audi secured their 12th win at the race since 2000 with a consummate run by the No2 car of Tom Kristensen, Allan McNish and Loïc Duval, tempered by the death of Danish driver Allan Simonsen in his Aston Martin during the opening laps.

The 90th anniversary edition of the endurance classic had been plagued by on-and-off rain in the days before Saturday's afternoon start and began under damp, greasy conditions. An immediate and thrilling battle between the Audis and Toyotas, who were showing much better pace than they had in qualifying, ensued but was curtailed under a yellow flag when Simonsen hit the barriers at Tetre Rouge. He was later pronounced dead at the circuit's medical facility.

The tragic accident dampened enthusiasm among the 245,000 fans attending but the race continued, as did Aston Martin with their remaining four cars at the Simonsen family's request.

On a drying surface Audi, running three of their 2013 iterations of the R18 e-tron quattro, had a distinct raw speed advantage over the two TS030s of Toyota and began stretching their legs on the grippier tarmac, with the No1 car of last year's winners – Marcel Fässler, André Lotterer and Benoît Tréluyer – showing particular pace early on as McNish, who had started from pole, noted.

"The conditions in my opening stint at the start were the worst I'd ever experienced at Le Mans," he said. "The rain level was not consistent around the track so it was extremely difficult knowing how late to brake – it was a lottery.

"I didn't want to take unnecessary risks and chose to bring the car home in one piece even if it meant losing time to André [Lotterer] who had snatched the lead from me at the start."

Sticking with the task, however, Duval took the lead just after 9.30pm when the No1 car lost 43 minutes and 12 laps in the pits to change an alternator and the threat from the No3 Audi of Lucas di Grassi, Marc Gené and Oliver Jarvis was largely negated when contact incurred a puncture that cost the squad two laps. It left the No2 car being chased by the No8 Toyota of Anthony Davidson, Sébastien Buemi and Stéphane Sarrazin who stayed within a lap and a half for the remainder of the race but were unable to reel in the quicker car.

The No1 crew held the lead until the end and it was an emotional Kristensen who brought the car home on Sunday, despite a worrying period in the final hour when extremely heavy rain plastered the circuit and a number of cars aquaplaned off. It was an extraordinary ninth Le Mans win for the driver from Denmark, which McNish, himself taking his third victory here, acknowledged. "In that circumstance you do need to have a calm Dane with you and he was a very calm Dane today. It was a nerve-racking time," he said.

It had been a particularly hard downpour, which was not entirely surprising in a race where the weather was always a factor. There were 11 caution periods run, covering five of the 24 hours, often caused when drivers were caught out by differing levels of grip across the 8.467-mile circuit.

Kristensen, McNish and Duval coped admirably, however and, running trouble-free with the exception of a single puncture, were able to maintain the blistering pace that prevented their rivals coming back at them.

"It was a perfect run from start to finish and you don't get many of those at Le Mans," said McNish.

"The final 75 minutes were so nerve-racking. A lap advantage may have looked secure but it wasn't, the win was still up for grabs. Even with our radar it was still difficult to predict what the weather was going to do. I've never lived through anything like it."

In the wet conditions at the end Buemi managed to close the gap to the lead but had to settle for second, still an admirable achievement in Toyota's only second year of returning to the sport. Their challenge next year, when Porsche also return to Le Mans with a new prototype, can be expected to be very strong.

The No3 Audi took third and the No7 Toyota of Alex Wurz, Nicolas Lapierre and Kazuki Nakajima managed fourth despite aquaplaning into the barriers in the closing stages, requiring extensive and speedy repairs. The No1 car held on to fifth, coming back impressively from 24th after their mechanical problem.

Kristensen dedicated the race win to Simonsen, Jacky Ickx honoured his memory from the podium as crowds thronged on to the start-finish straight at the close of the race and condolences and best wishes were passed on by fans and across the paddock. An investigation into the accident is ongoing but for the winners, who have made this race their own in the past decade and who made their mark again emphatically this year, everything remained in perspective.

"Obviously this horrible incident dampens the joy about another great Le Mans victory for Audi in which our team and our drivers were under extreme tension for 24 hours and couldn't make any mistakes," said Audi's head of motorsport, Dr Wolfgang Ullrich. "Our sympathy primarily goes to Allan Simonsen's family and friends but to the team of Aston Martin as well. It shows that you must never stop doing whatever is possible for safety in motorsport. This is the first fatal accident we've had to witness in 15 Le Mans years. I hope it'll [be] the last."

Jonny Kane, Danny Watts and Nick Leventis took their Strakka HPD to the win in the LMP1 privateer category; OAK Racing's Bertrand Baguette, Ricardo Gonzalez and Martin Plowman won in LMP2; GTE Pro saw victory for the No92 Manthey Porsche of Richard Lietz, Marc Lieb and Romain Dumas, while GTE Am honours went to the No6 Imsa Porsche of Jean-Karl Vernay, Raymond Narac and Christophe Bourret.