New York: Roger Federer outlasted Mikhail Youzhny 6-1, 6-7, 4-6, 6-4, 6-2 here to advance to the third round of the 2017 US Open.
The third-seeded Swiss great boosted his lifetime record against the Russian to 17-0 during the match on Thursday, Efe news reported.
Federer, 36, has never before reached the third round of a tournament by winning consecutive five-set matches.
The 35-year-old Youzhny was suffering with cramps through the fourth and fifth sets of the match, which lasted more than three hours.
"It wasn't always like this," Federer said following the epic contest at Flushing Meadows, acknowledging that he has not been accustomed to playing long matches over the course of a brilliant career.
"These 5-set battles are lots of fun, I feel quite warmed-up by now," he added.
Federer's next opponent will be Feliciano Lopez of Spain, who defeated countryman Fernando Verdasco 6-3, 6-2, 3-6, 6-1 in two hours and 10 minutes to claim a spot in the third round.
Tournament top-seed Rafael Nadal will square off Thursday night with Japan's Taro Daniel.
A victory for the Spaniard would fuel hopes for a semifinal match-up between world number 1 Nadal and Federer: arch-rivals, all-time greats and winners of the first three Grand Slam events of 2017.