Clay court king Rafael Nadal defeated world number one Roger Federer to win the Madrid Open tonight and avenge last year`s final defeat to the same opponent at La Caja Magica.

Nadal won an enthralling encounter 6-4 7-6 (7/5) in two hours and 11 minutes to capture a record-breaking 18th ATP Masters crown and extend his astonishing run of success on clay to 168 victories in 174 matches since 2005.

The triumph also saw the Spaniard win his second Madrid title having last year finished runner-up to Federer following a 6-4 6-4 defeat.

Nadal, who has now won three successive tournaments after being crowned champion on the clay of Monte Carlo and Rome as well, came into the match having beaten Federer in 13 of the previous 20 meetings between the two tennis superstars and the home favourites drew first blood after an evenly-fought first set.

Federer had chances to break in the second game but he failed to take them, and Nadal made him pay for that by immediately breaking the Swiss ace in the next game.

Federer, 28, cancelled that out straight away though after taking full advantage of a triple break-point to level up the scores at 2-2.

The next two games went to serve before Nadal made his second, and crucial, breakthrough in the seventh game following a fiercely fought battle that saw the left-hander earn four break points before finally putting the fifth one away.

The next three games went with serve, although Federer had a great chance in the 10th game after earning four break points, only to come up short as the 23-year-old Nadal took the set.

Nadal, who will return to second place when the new world rankings are released, then enjoyed the perfect start to the second set as he broke Federer in the first game, but the top seed again hit back immediately to level the games up at 1-1.

The next break came in the fifth game when second seed Nadal again got his nose in front, but once more Federer responded in the eighth game, breaking back to make it 4-4.

With neither player able to make any more in-roads on their opponents` serve, the set went to a tie-break, which saw Federer take the early initiative before Nadal hit back to secure the set, the match and the 39th title of his career.