LONDON — Novak Djokovic’s large lead in the rollicking Wimbledon final was slipping away, in no small part because of Roger Federer’s regal presence and resurgent play.

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 knew all too well that he had come up short in recent Grand Slam title matches.

Steeling himself when he so desperately needed to, 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.

“I could have easily lost my concentration in the fifth and just handed him the win. But I didn’t, and that’s why this win has a special importance to me, mentally,” Djokovic said. “I managed to not just win against my opponent but win against myself, as well, and find that inner strength.”

Cradling his trophy during the post-match ceremony, Djokovic addressed Federer directly, saying: “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 raise his Grand Slam total to seven titles and allow himself to overtake Rafael Nadal at No. 1 in the rankings.

“Novak deserved it at the end, clearly,” said Federer, who hadn’t been to a Grand Slam final since winning his 17th major at Wimbledon in 2012, “but it was extremely close.”

Federer, who turns 33 next month, won 88 of 89 service games through the semifinals and produced 29 aces in the final, but Djokovic broke him four times.

Federer 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, 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.

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.

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.

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.

“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.”

The post-game handshake between coaches Jack Del Rio of the Raiders and Andy Reid of the Chiefs eventually came off Thursday night, but it seemed for a while that there’s enough bad blood between the two that it might not happen. Once time ran out in the Chiefs’ 21-13 win that gave K.C. a leg up in the AFC West...