Swiss driver Buemi has won the race four times while Hartley picked up his third victory and the second for Toyota after his first victory with Porsche in 2017. Both had modest careers in Formula 1.
Denmark’s Tom Kristensen holds the record with nine wins.
Hirakawa took his first win to join fellow Japanese Kazuki Nakajima (3 wins) and Kamui Kobayashi (1) as winners of the famous race, which was first held in 1923.
Argentina’s Jose Maria Lopez followed a few minutes behind for Toyota’s No. 7 at the Circuit de la Sarthe in northwestern France.
Lopez was joined by Kobayashi and British driver Mike Conway, his teammates in last year’s No.7 victory to underline how Toyota has broken the grip of Audi and Porsche.
After a quiet night, Toyota suffered a rare blow when the No8 punctured with Buemi at the wheel around 7.30am and 15 minutes later Lopez stalled and needed an electrical reset, costing a lap .
Ryan Briscoe closed the race as the Glickenhaus 007 car finished in third place, five laps behind the winners.
American Josh Pierson became the youngest driver to compete at 16 years, 188 days, making him slightly younger than 16-year-old Matt McMurry in 2014.
Pierson completed 97 laps while sharing United Autosports USA team duties driving an Oreca 07 with Oliver Jarvis and Alex Lynn, finishing sixth in the LM P2 class.
More AP Auto Racing: https://apnews.com/hub/auto-racing and https://twitter.com/AP_Sports