Roger Federer completed the 1200th match win of his illustrious career in most dramatic fashion to reach the quarter-finals of the Madrid Open on Thursday.

The tennis legend survived two match points against French maverick Gael Monfils to extend his claycourt comeback and was joined in the last eight by Rafael Nadal and world No 1 Novak Djokovic.

The fourth-seeded Federer has eased past Richard Gasquet in the first match in Madrid and was all set for another comfortable win after routing Monfils in less than 20 minutes in the opening set. But the 18th ranked Frenchman found his rhythm to lead Federer 4-1 in the second round, prior to the Swiss coming within one point of a 5-4 advantage and a chance to serve for a historic milestone.

Monfils countered to take a 4-1 lead in the decider, before the 20-time Grand Slam Champion was back in control, winning six of the first seven points.

Roger Federer saved his first match-point on a second serve at 5-6, 30/40 finishing the point with a smash winner and a second match point, two points later.

Federer became the second player in the Open Era to hit the milestone, joining American Jimmy Connors (1274).