LONDON -- After four hours and 55 minutes, Novak Djokovic won the fifth-set tiebreak in Wimbledon's longest singles final to beat Roger Federer in a match for the ages.

The fifth set lasted just under two hours in itself, but it was Djokovic who edged past Federer in an epic 7-6, 1-6, 7-6, 6-4, 13-12 (3) victory -- Wimbledon's first fifth-set tiebreak under new rules introduced this year.

Djokovic saved two championship points in the final set, and his resilience and ability to swing tiebreaks in his favor saw him clinch his fifth career Wimbledon singles title. Here's how he did it:

Federer gets tight in the tiebreaks

play 1:08 Djokovic takes third set in tiebreaker Novak Djokovic wins the third set to take a 2-1 lead over Roger Federer.

Have a look at the stats and you'd think Federer had this match in the bag. He had a better first-serve percentage, more first- and second-serve points won, a better return record and more break points won. Everything went in Federer's favor -- including 40 more winners than Djokovic -- while he converted seven of 13 break opportunities.

"I don't know if losing 2-2-2 feels better than this one," Federer said after the match. "At the end, it actually doesn't matter to some extent. You might feel more disappointed, sad, over-angry. I don't know what I feel right now. I just feel like it's such an incredible opportunity missed, I can't believe it."

However, taking all this into account, there was one statistic in which Djokovic had the edge: unforced errors, as Federer hit nine more than Djokovic. And herein lies the story of the match. Djokovic didn't get his first break of serve until the fourth set, but he already was up two sets to one at that stage.

"It was probably the most demanding, mentally most demanding, match I was ever part of," Djokovic said afterward. "I had the most physically demanding match against Nadal in the finals of Australia [in 2012] that went almost six hours, but mentally, this was different level, because of everything."

Djokovic managed to find the mental edge in the tiebreaks, focusing just long enough in each to fend off Federer. Federer made an uncharacteristic eight errors across the two tiebreaks in the first and third sets and, by the fifth, Djokovic answered everything Federer threw at him. The pair have now played four five-set matches in Grand Slams, and Djokovic has won all four.

ESPN

ESPN

Djokovic sticks to the plan

Federer tried to mix things up against Djokovic. He spoke prematch about how he knew Djokovic's game inside out; he targeted Djokovic's backhand with sliced shots, keeping them low while also nullifying the threat of Djokovic's rocket forehand. Federer also knew if the game descended into rallying, then more often than not the relentless Djokovic would come through. So, Federer tried to force the tempo, utilizing more serve-volley than we have seen and generally pushing the pace of the match. Federer charged to the net 27 times more than Djokovic and won 15% more points.

Equally, on his serve, Federer caused Djokovic all manner of difficulty by using his brilliantly neutral ball toss to disguise which way his serve was going. Djokovic struggled throughout the match to read it, with Federer clocking up 25 aces to Djokovic's 10. However, in the tiebreaks, Djokovic went on the front foot, gambling on occasion and causing Federer to make uncharacteristic errors.

In the end, it came down to Djokovic converting key points when they mattered most, like those two championship points he saved when down 7-8 in the fifth.

"I was still happy to be at 8-all, 9-all, I don't remember what it was [after not converting on the two match points]," Federer said. "You try to see the positives, you try to take it as a good thing, I guess, that you're not down a break or that the match is not over yet. If I could have picked it before the match to be at 9-all in the fifth, that wouldn't be a terrible thing. You just always try to push yourself to see things on the better side."

Argentina's Gaston Gaudio was the last player to rebound from two match points down to win in a Grand Slam final, holding off Guillermo Coria in five sets at the 2004 French Open final. Only two other players did the same in a Wimbledon final:

1927: Henri Cochet (def. Jean Borotra in final)

1948: Bob Falkenburg (def. John Bromwich in final)

1949: Ted Schroeder (def. Frank Sedgman in QF)

1960: Neale Fraser (def. Butch Buchholz in QF)

During the mini-breaks in the decisive tiebreak, Djokovic reversed the trend and converted more points off his first serve than Federer to secure the title.

"It was one shot away from losing the match," Djokovic said. "This match had everything. It could have gone easily his way. He was serving extremely well the entire match. I had a lot of difficulties to read his serve. It was kind of a flashback to US Open when I saved the two match points against him, as well [2010 and 2011 US Open semifinals].

"In these kind of moments, I just try to never lose self-belief, just stay calm, just focus on trying to get the ball back, return, which wasn't serving me very well today."

Survival of the fittest

Federer will turn 38 in just over three weeks, and he would have become the oldest winner of a Grand Slam title had he clung on in the fifth set. Djokovic is already 32, but he too could be around for some time to come. He even paid tribute to Federer's longevity in his postmatch speech, calling his opponent an inspiration.

"I'm not really looking at age as a restriction of any kind, for me at least," Djokovic said. "What I said on the court, I really meant it: Roger really inspires me with his effort at his age. ... It depends not only on myself, it depends on circumstances in life. I'm not just a tennis player; I'm a father and a husband. You have to balance things out."

Neither man seems to be slowing down. In the fifth set, they both covered more ground per point than at any other moment in the match. (Djokovic clocked in at 12.5 meters per point to Federer's 12.2.) With neither looking likely to crack at 6-5 in the final set, Djokovic even had to check with the umpire about when, exactly, a tiebreak would come into effect.

Far from a sign of a loss of focus, Djokovic remained in the zone throughout. He saved two championship points in dramatic style and simply refused to buckle, before overpowering Federer in the decisive tiebreak. His fifth Wimbledon title does not feel like it will be his last.