BIRMINGHAM, England (Reuters) - Frenchman Kevin Mayer took heptathlon gold by a mere five points to deny Damian Warner in a thrilling finish to the two-day competition at the world indoor championships on Saturday.

Slideshow ( 4 images )

The Canadian went into the final event, the 1,000 metres, knowing he had to beat his great rival by at least 3.1 seconds but in the end fell just short despite winning the race in two minutes 37.12 seconds.

Mayer took a 34-point lead into the race and strained every sinew to hang on for fourth in 2:39.64 before facing an anxious wait to see if he had done enough.

In the end he had, just, and the world champion and Olympic silver medallist let out a huge roar when the news came through.

Mayer finished on a world-leading 6,348 points to Warner’s 6,343, with Estonia’s Maicel Uibo taking bronze with 6,265.

The result will go some way to settling the argument about who is the true heir to American Ashton Eaton, the multi-discipline competitor who denied Mayer decathlon gold at the 2016 Rio Olympic Games as he retained his London crown.

Mayer won the world title in London last year but this time Warner simply refused to let his opponent get away.

Such a nail-biting finish hardly looked possible going into the pole vault, the final event of the morning session which Mayer was expected to dominate.

While the 26-year-old Frenchman failed to repeat his personal best of 5.60 metres, eventually going out at 5.20 after clearing 5.00 at the first attempt, Warner beat his previous best mark by 30 centimetres to register 4.90.

Mayer went into the competition as clear favourite but insisted throughout that the key to winning was enjoying the competition, not dwelling on the pressure.

That was at its most intense in the 60m hurdles early on Saturday when Mayer lined up alongside accomplished sprinter Warner. Predictably, the 28-year-old Canadian won easily.

The strain on Mayer’s face was clear, but he stayed in Warner’s slipstream to record a creditable 7.83.

The fact that Warner made mistakes by hitting the first two hurdles cost him the overall lead going into the pole vault.

On the first day, Mayer recorded personal bests in the 60m and in the long jump, his weakest event, to offset a moderate high jump. That gave him a 45-point overnight lead which proved just enough but Warner pushed him all the way.