By Liz Clarke in Wimbledon, England

Novak Djokovic may not have been the better player from first ball to last in Sunday’s Wimbledon final.

But he summoned nerves of steel when it mattered most, blasting the shots, avoiding the costly errors and saving the two match points required to defeat eight-time Wimbledon champion Roger Federer, who had artistry and the Centre Court crowd on his side in his pursuit of a 21st Grand Slam title.

The 37-year-old Federer was the aggressor, hitting 94 winners to Djokovic’s 54, and he ultimately won more points (218 to 204). But it was Djokovic’s trophy to raise at the end of an exceptionally contested match that lasted 4 hours 57 minutes — the longest final in Wimbledon history.

With his 7-6 (7-5), 1-6, 7-6 (7-4), 4-6, 13-12 (7-3) victory, Djokovic claimed his fifth Wimbledon championship and the 16th major title of his career to pull within two of Rafael Nadal’s total and four of Federer’s all-time mark, which for now is paused at 20.

It was Wimbledon’s first singles championship settled under the tournament’s new tiebreak format, which was instituted this year and kicks in if the fifth set is knotted at 12 games each. The format was instituted to prevent soul-sapping marathons such as the three-day affair between John Isner and Nicolas Mahut in 2010, which dragged on until 70-68 in the fifth set, and last year’s semifinal between Isner and Kevin Anderson, which lasted to 26-24.

Djokovic called it the most mentally demanding match he had ever been part of and credited the victory, which he acknowledged easily could have been Federer’s, to will power and the mental and emotional aspects of his game that he has worked so hard to strengthen.

“Most of the match I was on the back foot, actually,” said Djokovic, 32. “I was defending; he was dictating the play. I just tried to fight and find a way when it mattered the most.”

Already the world’s top-ranked player, Djokovic has now won four of the past five majors, closing quickly on the standard of perfection Federer has set in his two-decade career. Federer acknowledged afterward that the match was “an incredible opportunity missed,” having let two match points and other opportunities slip away.

But asked about the steady assault by Nadal and Djokovic on his record of 20 Grand Slams, Federer came across as a man at peace.

“If somebody else does [break my record], well, that’s great for them. You can’t protect everything anyway,” he said. “I didn’t become a tennis player for that. It’s about trying to win Wimbledon, trying to have good runs here, playing in front of such an amazing crowd in this Centre Court against players like Novak and so forth. That’s what I play for.”

Sunday’s final was the 48th meeting between Djokovic and Federer. And it was fitting that the Wimbledon title came down to them, the field of 128 narrowed to the tournament’s No. 1 (Djokovic) and No. 2 (Federer) seeds. They were greeted by rousing cheers and a standing ovation when Djokovic led Federer onto Centre Court just before 2 p.m. Looking on from the front row of the Royal Box were the Duke and Duchess of Cambridge, with 80-year-old Rod Laver, the inspiration for both finalists, just behind, along with former Wimbledon champions Stefan Edberg, John Newcombe, Manuel Santana and Stan Smith.

To have a chance, most prognosticators said, Federer needed to win the opening set. The proceedings veered from that script.

Federer took the higher-risk approach in a first set of exceptional shot-making and touch. There was scarcely a grass-blade’s difference between them in quality, so it came down to a tiebreaker that Djokovic claimed.

If Federer was frustrated by 58 minutes of wasted effort while dropping the opening set, he redirected it magnificently, bolting to a 4-0 lead in the second while Djokovic took a mental walkabout, much as he had in Friday’s semifinal against Roberto Bautista Agut after claiming the opening set before winning in four. With the Serb seemingly disengaged, Federer needed just 25 minutes to level the match by claiming the second set.

The match unfolded with utter silence from the competitors. There wasn’t a grunt, groan or shout of “C’mon!” between them — whether the restraint reflected their respect for each other, for their sport’s most hallowed venue or was a tactical decision to devote their energy into each point was hard to say.

In Djokovic’s case, he explained, it was the latter.

“I promised myself coming on to the court today that I need to stay calm and composed,” he said, “because I knew that the atmosphere will be as it was.”

In other words: a lovefest for Federer, whose game and grace are custom-tailored for Wimbledon’s grass.

The third set was as tightly contested as the first, and again a tiebreak was required. The Serb jumped to a 4-1 lead and held on to take a two-sets-to-one advantage.

The physical and psychological toll should have been profound for Federer. But instead of fading in the fourth set, he broke Djokovic’s serve in the fifth game and held his own to take a 4-2 lead that thrilled the crowd, which erupted in cheers for the Swiss and the prospect of a fifth set.

The crowd got its wish. Federer and Djokovic produced a final set that alone was worth the price of admission — 2 hours 2 minutes long and full of swings of momentum, breakpoints and heroic comebacks.

Djokovic was first to nudge ahead, 4-2, after breaking Federer’s serve for just the second time in the match. When Federer immediately broke back, even guests in the Royal Box dropped any pretense of impartiality, cheering the fight left in the Swiss.

This is where another mental trick of Djokovic’s kicked in — “transmuting” the noise, he called it afterward.

“When the crowd is chanting, ‘Roger!’ I hear ‘Novak!’ ” he explained. “It sounds silly, but it’s like that. I try to convince myself that it’s like that.”

At risk of losing his serve at 5-5, which would have essentially gift-wrapped the victory for Federer, Djokovic lunged full-out to stab back a winning volley. Neither man budged.

So at 6-6, the match just shy of the four-hour mark, they played on for the two-game lead required to win the fifth set. The stadium erupted when Federer got the service break he needed by toying with the pace and trajectory of his shots and coaxing Djokovic into errors. The match was on his racket.

Djokovic roared back, saving two match points to draw even again at 8-8.

And on they played, until a miscue by Federer ended it.

Djokovic pointed to the sky, then calmly strode to the net. There, they shared an embrace: one victor, but two champions who had an equal part in tennis history.

Match highlights

by Ava Wallace in Washington

Game, set, match: Djokovic wins, 7-6 (7-5), 1-6, 7-6 (7-4), 4-6, 13-12 (7-3)

In an epic five-set match that lasted just shy of five hours, Djokovic repeated to win his fifth Wimbledon title and 16th singles title at a Grand Slam event. It’s the second time he’s won back-to-back Wimbledon titles in his career, following 2014-15, and he made history in the meantime: This was the first fifth-set tiebreak ever played at Wimbledon.

Fifth set: Tied at 12-12

We’re headed for a tiebreak, the first that’ll ever be played in a fifth-set championship at Wimbledon.

Fifth set: Tied 6-6

Let’s review the fifth-set tiebreak rule at Wimbledon, since it’s different at every major. At the All-England Club, players do a regular tiebreaker when the match reaches 12-all in the fifth set. Djokovic and Federer just reached the four-hour mark in this match. Stay hydrated, everybody.

Fifth set: Federer breaks back, Djokovic leads 4-3

This is getting tense, and the Wimbledon crowd has completely (and loudly) gotten in Federer’s corner. The Swiss broke back to stay in this match, but Djokovic’s return game is staying strong.

Fifth set: Djokovic takes a 4-2 lead

Djokovic played an excellent passing shot that Federer’s backhand couldn’t quite reach and he’s taken the first break of this fifth sets. Though Federer’s won more points this match, Djokovic is winning when it counts. A fun aside: this is just the sixth Wimbledon men’s final this century to have gone five sets, and Djokovic is two games from victory.

Fourth set: Federer wins, 6-4

Federer’s not done yet. The 37-year-old evened things at two sets all, fending off his first break points of the match along the way. The first he faced, he won by triumphing in a 35-shot rally, the longest of the match. With Federer’s serve looking impeccable and Djokovic’s defending in peak form, this fifth set should be fun.

Fourth set: Federer leads 5-2

Wimbledon, the place for summer’s hottest roller coasters. Credit Federer’s serve against the game’s best returner for this one — he hasn’t faced a single break point all match, then held at love to take a 4-2 lead and broke Djokovic again. It seemed after the third that the defending champion had this thing all wrapped up, but Federer says not so fast.

Third set: Djokovic takes a two sets to one lead

The defending champ won the third set 7-6 (7-4) in another tiebreak by throwing the kitchen sink at Federer, who was just one iota worse despite saving a few set points with brilliant serving. But it wasn’t the Swiss’s serving that was the problem — his backhand betrayed him and his forehand wasn’t quite there. Djokovic has never lost to the Swiss champion up two sets to one, and Federer may not get many more chances to swing the match. That was a big missed opportunity.

Third set: Even at 4-4

The only good thing about that second set for Djokovic was that it was over quickly, and the defending champ seems to have regrouped. Djokovic has gotten his game back on track, and it feels a little bit like the first two sets were something of a wash. He’s back to his good defending and won the longest rally of this match — a 21-shot marathon — in the fourth set. In the set’s eighth game, he held at 40-15.

Second set: Federer wins 6-1 to even the match

Alright, then. Federer made Djokovic run in that set, and Djokovic couldn’t keep up. That’s one of the worst sets the Serb has ever played against Federer — according to the Times of London’s tennis correspondent Stu Fraser, it’s the fewest games he’s won in a set against Federer since 2012. Now it’s Federer’s task to not lose that momentum.

Second set: Djokovic gets on the board, Federer leads 4-1

What is it with these weird second sets? Federer had an uncharacteristic one in his semifinal against Rafael Nadal, and now Djokovic has all but gone away after winning the first set tiebreak, with no apparent physical ailments. He finally made an appearance in the fifth game of the set.

Second set: Federer takes a 2-0 lead

Federer got the match’s first service break coming out of the tiebreak then consolidated for a 2-0 lead. He had to do something to get the momentum swinging his way after losing that first set — Djokovic is 63-1 in majors after winning the first, and 18-1 against Federer. Tough odds.

First set: Djokovic wins in a tiebreak, 7-6 (7-5)

After 12 straight holds of service, Federer sent a rare backhand wide and Djokovic took the first set in a tiebreak. It was the pair’s 25th tiebreak in their career meetings and Djokovic now owns the edge, 13-12, in addition to a one-set lead. Down 5-3 in the tiebreak, he won the final four points to get ahead.

First set: Even at 3-3

Both players held serve in the opening games of this first set of their 48th meeting, so let’s talk about who’s watching in the Royal Box.

The Duchess of Cambridge is back for round two (she’s a royal patron of the All England Club and besides that a big tennis fan), this time with her husband William, Duke of Cambridge. Amazon founder Jeff Bezos is up there as well, along with a host of past Wimbledon champions including Rod Laver, Stefan Edberg and Chris Evert. Actors Benedict Cumberbatch and Edward Norton are present, too.

Read more: