MADRID (AP) A decade after their first match, when they were a couple of promising teenagers, Novak Djokovic defeated Andy Murray again in Madrid, this time to win a record 29th career Masters title.

The top-ranked Djokovic defeated the second-ranked Murray 6-2, 3-6, 6-3 in the Madrid Open final on Sunday, 10 years after their rivalry started in the round of 16 of the tournament in Spain.

''Ten years (later) we are the two best players in the world, which at that time maybe it seemed like something that will be very challenging for us to achieve,'' said the 28-year-old Djokovic, who beat Murray in three sets in that 2006 meeting.

''But we both thrived to be at the top, and we've known each other since we were 12. I think you can see already in those junior days that both of us have serious intentions to conquer the tennis world.''

Djokovic saved seven break points in the final game and converted on his third match point of the night to secure the win over the defending champion on Sunday, moving one victory ahead of Rafael Nadal in Masters tournament victories.

The loss kept Murray from winning his 12th Masters title, and will drop the British player to No. 3 in the ranking on Monday, when he will be surpassed by Roger Federer, third in the list of Masters winners with 24 titles.

''I'm very pleased that I have developed a great rivalry with somebody that I've known since very long time and somebody that I have a very good and friendly relationship with on and off the court,'' Djokovic said.

Djokovic has won 12 of the last 13 matches against Murray since 2014, and is 23-9 overall against the 28-year-old British player.

It was Djokovic's second title in Madrid, and fifth of the year this season. He reached 33 wins, the most on tour in 2016. The win leaves the Serb tied with Bjorn Borg and Pete Sampras for sixth on the Open Era titles list with 64.

''It's obviously very flattering to be alongside such legends of the sport, tennis players that I was looking up to,'' Djokovic said. ''It's an achievement that I'm very proud of.''

Djokovic dominated the first set but it was even from then until the end, with both players faltering on decisive moments. Djokovic hit 25 winners but had as many unforced errors, while Murray had 10 aces in the match that lasted 2 hours, 6 minutes at the ''Magic Box'' center court in the Spanish capital.

The thrilling last game finally ended when Murray sent a forehand into the net, giving Djokovic his 15th straight win against top-10 opponents, a streak in which he has lost only two of 35 sets.

''That's why he's No. 1 just now,'' Murray said. ''He fought very hard in that game and served well when he was a bit nervous. At the end he came up with some big serves and got himself some free points and did well.''

Djokovic has won five of the last six Masters titles, including three this year. He had already won in Indian Wells and Miami, and had also clinched the Australian Open in a final against Murray.

His next tournament will be the Rome Masters next week, and then he plays at the French Open, where he lost the last two finals.

''I had an amazing opening four months of the season,'' Djokovic said. ''I came here early, got used to the conditions, and played a really fantastic tournament that will definitely serve as a great confidence boost before Rome and of course French Open, where I want to arrive in a best possible shape.''

The nine Masters tournaments of the season are elite tournaments ranked just below the four Grand Slams.

It was Djokovic's first clay-court tournament since being upset by 55th-ranked Jiri Vesely in the second round in Monte Carlo last month.

Djokovic had won in Madrid for the first time in 2011.

In addition to beating home-crowd Nadal in straight sets in last year's final, Murray had also won the Madrid tournament in 2008, when it wasn't considered a Masters. He defeated Nadal in the semifinals on Saturday.

The Briton has been impressive this season on clay, the surface which has seen him struggle the most in his career. He was coming off a semifinal loss to Nadal in three sets in Monte Carlo.

''I just think I'm definitely moving better (on clay). That's for sure. It makes a huge difference,'' Murray said. ''I'm not going on the court sort of a little bit nervous or apprehensive. I believe I can play well on clay now.''

Murray is still expected to be considered one of the main favorites at the French Open, where he lost to Djokovic in last year's semifinals.

''It's been positive from where I was a few weeks ago going into Monte Carlo,'' Murray said. ''I've played some really good stuff. See what happens the next few weeks.''


Tales Azzoni on Twitter: http://twitter.com/tazzoni