Andy Murray’s 28-match winning streak has been ended by Novak Djokovic in the Qatar Open final.

The world number one has enjoyed a dream run to the very top of the sport, including victory over Djokovic at the 2016 season-ending ATP Tour Finals in London.

But the man he replaced at the top of the rankings gained some measure of revenge by retaining his title here with an absorbing 6-3 5-7 6-4 triumph – but only after Murray had saved three match points to force a deciding set.

The Serbian was seemingly on the brink of victory when serving for the match at 5-4 but the British star showed tremendous resilience to break back before taking the next two games.

Murray, who had failed to win any of the 19 matches between the pair when Djokovic had won the opening set, was now favourite to go on an claim the title and had the first opportunity to break in the final set.

But he failed to take it and then could not hold his subsequent service game as his great rival dug in to put himself on course for a 6-3 5-7 6-4 success in a match which lasted almost three hours.

The result potential gives Djokovic a psychological advantage ahead of the Australian Open, which runs from January 16-29.

Saturday’s final was the first meeting between the two players since Murray had overtaken his long-term rival to become world number one – and both began in aggressive fashion.

It was Murray who had the first chance to break but the impressive Djokovic, who required treatment for a bleeding finger at 30-30 in the third game, shrugged off his minor injury to deny his opponent.

The Serb then won four points in a row to come from 40-15 down in the eighth game and take Murray’s serve, before clinching the opening set.

Djokovic, who saved five match points in his thrilling semi-final win over Fernando Verdasco, then looked set to wrap up the match after breaking Murray again in the second as he built a 5-3 lead.

But the world number two was given a taste of his own medicine as Murray showed superb resilience to stay in the match and win four successive games to level the contest at one set all.

Murray had never beaten the Serb in 19 matches when he had dropped the opening set but it seemed the momentum could be with him as he looked to end that record.

Djokovic, however, found an extra gear and secured the only break of the deciding set in the seventh game to ensure he retained the trophy.

Murray told Eurosport: “It was a tough one to lose, but a great way to start the year. I think it was high-level tennis.

“Some of the points were physically tough, but a great way to start the new year playing like that and I look forward to the next few weeks.

“I’ve had a fantastic week here, I’ve really enjoyed it.”

Champion Djokovic said: “(It was) definitely one of the best ways to start the year.

After saving five match points and winning yesterday’s semi-final, I had three or four match points in the second set.