Three-time winner and defending champion Brendon Hartley will start third on the grid for this weekend's centenary Le Mans 24 hour race in France.
The Toyota driver will sit behind two Ferrari's on the grid.
Two-time winner Earl Bamber was sixth fastest in a Cadillac, while the third New Zealander in the field Scott Dixon in another Cadillac will start eighth.
Ferrari's pole is their first in a half a century and ends a run of six consecutive for Toyota.
Ferrari's last win was in 1965, the year before the New Zealand pair of Chris Amon and Bruce McLaren won in a Ford GT.
Dixon's car will need some work done to it before the start after it caught fire during the session.
Le Mans is celebrating its 100th birthday this weekend with organisers of the world's most famous sportscar race looking towards a greener future while paying homage to the past.
A sold-out crowd of more than 300,000 is expected, many of them travelling to France by car in what has become an annual pilgrimage for British racing fans since the success of the 1920s 'Bentley Boys'.
Reducing that considerable carbon footprint represents a major challenge for organisers the Automobile Club de l'Ouest.
Pierre Fillon, the Le Mans-born president of the ACO, said 10,000 'green tickets' had been sold, offering a 10% discount to those arriving by electric or hybrid car, train, tram, carpool or bicycle.
"Most of the carbon emission from the 24 Hours, 70%, comes from the spectators," he told Reuters in an interview ahead of what will be the 91st edition of a race first run on May 26-27, 1923.
"We want really to push the spectators to reduce their carbon emissions when they come to Le Mans."
On track, cars use a 100% sustainable fuel while the tyres for the top hypercar class now have 46% renewable material in their construction.
A new hydrogen category will be introduced in 2026, with cars either using fuel cell technology or combustion engines running on hydrogen, and all hypercars will eventually be hydrogen-powered.
The 300,000 tickets for this year's event sold out in December, and next year Lamborghini, Alpine and BMW are joining the current seven in Hypercar (Porsche, Toyota, Ferrari, Peugeot, Cadillac, Vanwall and Glickenhaus).