By Karolos Grohmann

BERLIN (Reuters) - Ethiopia's Kenenisa Bekele narrowly missed out on a new world record when he out-sprinted Kenya's Wilson Kipsang to win the Berlin marathon in the second fastest race of all time on Sunday.

The triple Olympic champion weathered Kipsang's blistering early pace before he attacked with two kilometers left, crossing the line in an official time of two hours, three minutes and three seconds, six seconds off Dennis Kimetto's world record.

Kipsang, a former world record holder who won in Berlin three years ago but like Bekele missed last month's Rio Olympics, could not match the Ethiopian's pace toward the end and finished 10 seconds adrift in the fourth-fastest time ever.

"I wanted to run a personal best, that was my first goal," Bekele, who shaved more than two minutes off his previous fastest, told reporters. "The time was fantastic but I am a bit disappointed as well, as I missed a few seconds in the end."

A strong early pace, with the leading runners passing the five kilometer mark in an eye-popping time of 14 minutes 20 seconds, meant the main contenders had the world record in their sights from the start.

Both Kipsang, who set his world record in Berlin in 2013 only to lose it to fellow Kenyan Kimetto a year later, and Bekele stuck behind the pacemakers, with the experienced Emmanuel Mutai joining them.

A lightning fast race was confirmed by the halfway mark with the leading pack more than a minute inside world record pace as Mutai, second in Berlin 2014, dropped off the pace.

It quickly became a two-horse race and after 30 kilometers it was Bekele's turn to drop some 30 meters behind the leader as Kipsang staged his first attack.

But the 34-year-old Ethiopian, still the world record holder for the 5,000 and 10,000 meters on the track, refused to buckle and caught Kipsang in the next two kilometers.

Bekele then drew on his strong finish from his days on the track and elegantly pulled away after the final drinks station as Kipsang failed to stay in touch.

"I was hoping to win it and run a personal best. I did it," said Kipsang, who was 10 seconds faster than his world record time of 2013.

"We both ran a fantastic race together and I missed him (Bekele) by a few seconds. Next time it will be another day."

Ethiopia enjoyed a sweep of the podium in the women's race with Aberu Kebede winning her third Berlin marathon with a time of 2:20:45. Her compatriots followed her home with Birhane Dibaba claiming second ahead of Ruti Aga.

(Reporting by Karolos Grohmann; Editing by John O'Brien)