(Reuters) - Toyota led the Le Mans 24 Hours sportscar race into the morning on Sunday after a close battle with champions Porsche through the night at the Sarthe circuit in western France.

After 17 hours, Swiss driver Sebastien Buemi was at the front of the field in the number five Toyota TS050 with Britain's Mike Conway a close second in the Japanese manufacturer's number six car.

The number two Porsche, with Switzerland's Neel Jani at the wheel, was seconds behind with all three frontrunners lapping at a similar pace.

Porsche's number one car was effectively out of contention after a long stay in the pits around midnight as mechanics wrestled with high water temperatures.

The car -- shared by Australian Mark Webber, New Zealand's Brendon Hartley and Germany's Timo Bernhard -- was 30th and 38 laps down.

"We have been plugging away and putting in consistent lap times through the night, without taking unnecessary risks," said Britain's Anthony Davidson, who shares the number five Toyota with Buemi and Japan's Kazuki Nakajima.

"It’s a long race and we’ve got to stay in the fight all the way to the end. Everyone has done a good job so far; we’ll keep pushing."

Japan's Kamui Kobayashi, in the number six Toyota, lost precious seconds during his night stint when he made contact with a GT car.

Porsche and stablemates Audi have each entered only two cars instead of three in the main LMP1 category for cost-cutting reasons in the wake of parent company Volkswagen's diesel emissions scandal.

Last year's race was won by Germany's Nico Hulkenberg, New Zealander Earl Bamber and Britain's Nick Tandy but none of them are driving in the main LMP1 category this time.

Hulkenberg is competing in Sunday's European Formula One Grand Prix in Baku for Force India.

Porsche, who returned to Le Mans with a works team in 2014 for the first time in 16 years, are the most successful manufacturer with 17 titles. Toyota have yet to finish higher than second.

The race, now in its 84th edition, also marks the return of Ford in the GTE Pro category with the U.S. manufacturer locked in a battle with Ferrari.

(Reporting by Alan Baldwin, editing by Peter Rutherford)