The 33-year-old looked beaten as 23-year-old debutant Medvedev broke serve twice in the decider to stand on the brink of a first career victory over the Spaniard he pushed to five sets in an epic U.S. Open final in September.
For once world number one Nadal’s trademark fighting spirit seemed to have deserted him but he saved a match point at 1-5 with a superb drop shot and was suddenly re-energised.
Twice Medvedev served for the match, at 5-2 and 5-4, but he tightened up and Nadal, roared on by the 02 Arena crowd, needed no second invitation to take advantage.
Nadal edged ahead when he held serve at 5-5 and when Medvedev trailed 0-30 in the next game it appeared the Russian was now a spent force.
Medvedev regained his composure in the nick of time to hold serve with an ace and take the match into a deciding set tiebreak and looked dangerous again.
Yet he missed a forehand with the court gaping after a long rally at 4-5 to give Nadal two match points.
Medvedev thought he had saved the first one with a backhand winner but it was called out and his Hawkeye challenge showed the ball had missed the line by a fraction.