After nearly 11 months of intense competition across all corners of the planet, the last major honour of the year will be decided by the last match on the last day of the season. Andy Murray and Novak Djokovic, world No 1 and No 2 respectively, will meet here on Sunday to decide not only the winner of the Barclays ATP World Tour Finals but also which of the two rivals will end the year on top of the world rankings.

The two men earned the chance to meet for the first time since Djokovic’s victory in the French Open final more than five months ago by winning their semi-finals here in London in contrasting fashion.

After Murray had beaten Milos Raonic 5-7, 7-6, 7-6 after three hours and 38 minutes – the longest three-set match played on any surface anywhere in 2016 – Djokovic needed just an hour and six minutes to beat Kei Nishikori 6-1, 6-1. Only three days earlier Murray had taken three hours and 20 minutes to find a way past Nishikori in what - at that stage - had been the longest match ever played in the tournament here.

“I don't know how I’ll feel tomorrow,” Murray said as he looked forward to the final. “I’m obviously tired just now because it was a really hard match. It wasn’t just that it was physically hard, it was mentally a tough match, too. It was pretty stressful.”

The final will be the perfect end to a season dominated by the two men. Djokovic had led the world rankings for 122 weeks in a row until Murray replaced him at the top earlier this month.

Djokovic, who won the Australian and French Opens, reigned supreme until the start of the grass-court season, but since then Murray has enjoyed an equally remarkable run. The Scot will be attempting to win his fifth tournament in a row and his 24th match in succession when he takes on Djokovic, who has won 24 of their 34 encounters, including three of their four meetings this year.

Djokovic, who is aiming to win this tournament for the fifth year in a row, has shown improved form in the last week, but Murray has delivered some extraordinary performances to reach this final for the first time.

When it was pointed out to him that he has not had to play Djokovic during his unbeaten run, Murray said: “You can only beat the players that are in front of you. I can’t do any more than that. I’ve done that this week. I’ve beaten three guys in the top five in the world.”

There have been times during Murray’s stunning run when his brilliance has swept opponents aside, but there have also been matches when he has had to grind out victories. This was one of the latter occasions as he produced a performance which had echoes of his victory over Raonic in the final of the Aegon Championships at Queen’s Club earlier this summer. Once again Murray lost the first set and went a break down in the second before claiming a famous victory.

Murray, who had won his last seven meetings with Raonic, including the Wimbledon final, usually copes with the Canadian’s huge serve better than most. However, on this occasion he did not force a break point for more than an hour, while Raonic made regular inroads into the home favourite’s service games in the early stages.

The Scot was taking twice as long as his opponent to win his service games in the opening set and at 5-5 he finally crumbled. Having played two loose shots in going 15-40 down, Murray double-faulted to give Raonic the chance to serve out for the set.

Murray, nevertheless, started the second set in a positive frame of mind and after 72 minutes finally forced his first break point, only for Raonic to make the first break of serve in the third game. The prospects were not looking good for Murray, but he responded in typical fashion, breaking Raonic to love in the following game. In the ensuing tie-break Raonic recovered from 4-1 down to 5-5, but Murray created set point with a splendid volley before an unreturned serve saw him level the match.

The deciding set became a ferocious scrap in an increasingly raucous atmosphere. At 4-4 Murray brought the house down by breaking Raonic to love, but now it was Raonic’s turn to show his resilience by breaking as Murray attempted to serve for the match.

At 5-5 Raonic was broken once again, losing three points in a row with two missed forehands and a double fault. Murray served for the match for the second time, but to agonised gasps from the crowd was broken again, which left the Scot with a look of disbelief on his face.

After 254 points – of which both men had won 127 – the contest came down to a deciding tie-break. Raonic saved a first match point with a bold forehand down the line at 5-6, a second at 6-7 when Murray missed a backhand and a third at 8-7 when the Scot netted a forehand. At 8-9 Murray saved a match point with a winning volley and two points later he finally secured victory when Raonic missed a forehand.

“I fought really hard,” Murray said afterwards. “I fought very hard this week and the last few months. It would have been easy today when I was behind to have gone away a little bit, but I didn’t. I fought hard. Even after serving for the match twice, having a bunch of match points in the tie-break, I still stayed tough, chased balls down, fought as best as I could.”