No man has won tennis' oldest major tournament more often than Federer, and he was not about to let it go easily. Djokovic went from being a point from victory in the fourth set to suddenly caught in the crucible of a fifth, and he knew all too well that he repeatedly had come up short in recent Grand Slam title matches.
Steeling himself when he so desperately needed to, and steadying his weary legs, Serbia's Djokovic held on for a 6-7 (7), 6-4, 7-6 (4), 5-7, 6-4 victory after nearly four hours of momentum shifts Sunday to win Wimbledon for the second time -- and deny Switzerland's Federer what would have been a record eighth championship at the All England Club.
"It was a great match to be part of. He's a magnificent champion and a great example of a great athlete and great role model for many kids," Djokovic said during the on-court ceremony, cradling the trophy in his left arm.
Then, addressing Federer directly, Djokovic said: "I respect your career and everything you have done. And thank you for letting me win today."
Even Federer had to smile at that line.
Truth is, Djokovic deserved plenty of credit for figuring out a way to pull off this win, which raises his Grand Slam total to seven titles and allows him to overtake Rafael Nadal at No. 1 in the rankings.
"It was close, you know," said Federer, who hadn't been to a Grand Slam final since winning his 17th major at Wimbledon in 2012. "Novak deserved it at the end, clearly, but it was extremely close."
Federer, who turns 33 next month, won 88 of 89 service games through his first six matches this fortnight, and produced 29 aces in the final, but Djokovic broke him four times.
Federer, looking as agile as he has in years, went to the net aggressively, only to see Djokovic zoom more than a dozen passing shots past him. And with most of the Centre Court crowd of about 15,000 raucously cheering for Federer, the 27-year-old Djokovic kept believing in himself.
That part might have been the most difficult, given that Djokovic lost his past three major finals, and five of his past six, including against Andy Murray at Wimbledon last year, and against Nadal at the French Open last month.
"He's the biggest competitor -- his sense of not giving up, giving it always another try," said Boris Becker, the three-time Wimbledon champion who began coaching Djokovic this season.
"It could've gone either way in the fifth set," said Becker, whose old rival as a player, Stefan Edberg, now works with Federer. "Novak finds another way. He digs deep and finds another way."
Djokovic built a 5-2 lead in the fourth set and served for the championship at 5-3. But Federer broke there for the first time all afternoon, smacking a forehand winner as Djokovic slipped and fell on a patch of brown dirt.
Djokovic took a nastier tumble in the second set, hurting his left leg and prompting the first of two medical timeouts; he got his right calf massaged by a trainer in the fifth.
With Federer serving at 5-4 in the fourth, he double-faulted to 30-all, then netted a backhand for 30-40 -- handing Djokovic a match point.
Federer hit a 118 mph (190 kph) serve that was called out, but he challenged the ruling, and the replay showed the ball touched a line for an ace. That was part of Federer's five-game run to force a fifth set. It would be another 42 minutes until Djokovic again stood so close to triumph.
"Can't believe I made it to five," Federer said. "Wasn't looking good there for a while."
In truth, after so much drama, the ending was anticlimactic. Trailing 5-4 but serving, Federer missed four groundstrokes, pushing a backhand into the net on Djokovic's second match point.
Victory his, Djokovic knelt on the most hallowed tennis court in the world, plucked a blade of grass and shoved it in his mouth, just as he did after his 2011 Wimbledon title. He dedicated this victory to his pregnant fiancee "and our future baby," and to Jelena Gencic, his first tennis coach, who died last year.
"This is the best tournament in the world, the most valuable one," Djokovic said. "The first tennis match that I ever (saw) in my life, when I was 5 years old, was Wimbledon, and that image stuck (in) my mind."
For complete Wimbledon coverage, including updated draws and reports from Steve Tignor, head to our tournament page.