LONDON – Novak Djokovic won his second Wimbledon title and denied Roger Federer his record eighth by outlasting the Swiss player in five sets Sunday.

Djokovic wasted a 5-2 lead, and a match point, in the fourth set but held on for a 6-7 (7), 6-4, 7-6 (4), 5-7, 6-4 Centre Court victory that returned the Serbian player to the No. 1 ranking.

It was Djokovic’s seventh Grand Slam title and broke a streak of three consecutive losses in major finals and in five of his past six.

IN PHOTOS: Djokovic and Federer battle at 2014 Wimbledon men’s final

Novak Djokovic of Serbia holds his head in hands during the Gentlemen's Singles Final match against Roger Federer of Switzerland on day thirteen of the Wimbledon Lawn Tennis Championships at the All England Lawn Tennis and Croquet Club on July 6, 2014 in London, England. (Photo by Matthew Stockman/Getty Images). Novak Djokovic of Serbia during the Gentlemen's Singles Final match against Roger Federer of Switzerland on day thirteen of the Wimbledon Lawn Tennis Championships at the All England Lawn Tennis and Croquet Club on July 6, 2014 in London, England. (Photo by Al Bello/Getty Images). Roger Federer of Switzerland shouts after winning a point during the men's singles final against Novak Djokovic of Serbia at the All England Lawn Tennis Championships in Wimbledon, London, Sunday, July 6, 2014. (AP Photo/Pavel Golovkin). Novak Djokovic of Serbia celebrates during the Gentlemen's Singles Final match against Roger Federer of Switzerland on day thirteen of the Wimbledon Lawn Tennis Championships at the All England Lawn Tennis and Croquet Club on July 6, 2014 in London, England. (Photo by Clive Brunskill/Getty Images). Roger Federer jumps for a return against Serbia's Novak Djokovic during their men's singles final match on day thirteen of the 2014 Wimbledon Championships at The All England Tennis Club in Wimbledon, southwest London, on July 6, 2014. AFP PHOTO / CARL COURT. Novak Djokovic returns to Switzerland's Roger Federer during their men's singles final match on day thirteen of the 2014 Wimbledon Championships at The All England Tennis Club in Wimbledon, southwest London, on July 6, 2014. AFP PHOTO / GLYN KIRK . Story continues below advertisement Serbia's Novak Djokovic gestures during his men's singles final match against Switzerland's Roger Federer on day thirteen of the 2014 Wimbledon Championships at The All England Tennis Club in Wimbledon, southwest London, on July 6, 2014. AFP PHOTO / GLYN KIRK . Roger Federer falls during the Gentlemen's Singles Final match against Novak Djokovic of Serbia on day thirteen of the Wimbledon Lawn Tennis Championships at the All England Lawn Tennis and Croquet Club on July 6, 2014 in London, England. (Photo by Pool/Getty Images). Switzerland's Roger Federer jumps for a return against Serbia's Novak Djokovic during their men's singles final match on day thirteen of the 2014 Wimbledon Championships at The All England Tennis Club in Wimbledon, southwest London, on July 6, 2014. AFP PHOTO / CARL COURT . Novak Djokovic returns to Switzerland's Roger Federer during their men's singles final match on day thirteen of the 2014 Wimbledon Championships at The All England Tennis Club in Wimbledon, southwest London, on July 6, 2014. AFP PHOTO / CARL COURT. Serbia's Novak Djokovic returns to Switzerland's Roger Federer during their men's singles final match on day thirteen of the 2014 Wimbledon Championships at The All England Tennis Club in Wimbledon, southwest London, on July 6, 2014. AFP PHOTO / CARL COURT . Roger Federer plays a forehand return during the Gentlemen's Singles Final match against Novak Djokovic on day thirteen of the Wimbledon Lawn Tennis Championships at the All England Lawn Tennis and Croquet Club on July 6, 2014 in London, England. (Photo by Matthew Stockman/Getty Images).

In the last set, Djokovic broke in the final game with the help of four mistakes by Federer to seal the win.

Story continues below advertisement

After the players met at the net, Djokovic went to the middle of the court, knelt down and plucked out a piece of grass and ate it, similar to what he did in 2011 when he won his first title here.

Trailing 5-4 in the fourth set, Federer double-faulted to make it 30-30. He then put a backhand into the net to set up a championship point for Djokovic.

The 32-year-old Federer then hit a serve that was ruled out, but he challenged it and the Hawk-Eye replay showed that it hit the line for an ace – one of his 29 in the match. Federer went on to break in the next game before forcing a fifth set.

“I was hoping that Roger was going to miss the first serve, but that didn’t happen,” Djokovic said. “It rarely happens. That’s why he has 17 Grand Slams and he’s been the most successful player ever, because in important moments, he comes up with his best shots and top game.”

READ MORE: Eugenie Bouchard loses women’s Wimbledon final to Petra Kvitova

Djokovic said it was difficult to stay focused heading into a deciding set.

“Of course, after dropping a fourth set, it wasn’t easy to regroup and compose myself and find that necessary energy to win the fifth,” Djokovic said. “I don’t know how I managed to do it.”

Story continues below advertisement

Federer said it was an “amazing” match.

“You know going into a match with Novak, it’s always going to be tough,” Federer said. “Sometimes rough physically, because we play athletic points. I can only say congratulations today.”

Djokovic had 27 unforced errors in the match while Federer had 29. Djokovic broke Federer four times while Federer converted three of his seven break points.

IN PHOTOS: Celebrities sit in the Royal Box at Wimbledon

David Beckham and Victoria Beckham in the Royal Box on Centre Court before the Gentlemen's Singles Final match between Roger Federer of Switzerland and Novak Djokovic of Serbia on day thirteen of the Wimbledon Lawn Tennis Championships at the All England Lawn Tennis and Croquet Club on July 6, 2014 in London, England. (Photo by Matthew Stockman/Getty Images). Chris Hemsworth and Elsa Pataky in the Royal Box on Centre Court before the Gentlemen's Singles Final match between Roger Federer of Switzerland and Novak Djokovic of Serbia on day thirteen of the Wimbledon Lawn Tennis Championships at the All England Lawn Tennis and Croquet Club on July 6, 2014 in London, England. (Photo by Pool/Getty Images). Victoria Beckham and Samuel L Jackson in the Royal Box on Centre Court before the Gentlemen's Singles Final match between Roger Federer of Switzerland and Novak Djokovic of Serbia on day thirteen of the Wimbledon Lawn Tennis Championships at the All England Lawn Tennis and Croquet Club on July 6, 2014 in London, England. (Photo by Pool/Getty Images). Bradley Cooper in the Royal Box on Centre Court before the Gentlemen's Singles Final match between Roger Federer of Switzerland and Novak Djokovic of Serbia on day thirteen of the Wimbledon Lawn Tennis Championships at the All England Lawn Tennis and Croquet Club on July 6, 2014 in London, England. (Photo by Matthew Stockman/Getty Images). Prince William Duke of Cambridge and Catherine, Duchess of Cambridge in the Royal Box on Centre Court before the Gentlemen's Singles Final match between Roger Federer of Switzerland and Novak Djokovic of Serbia on day thirteen of the Wimbledon Lawn Tennis Championships at the All England Lawn Tennis and Croquet Club on July 6, 2014 in London, England. (Photo by Matthew Stockman/Getty Images). General view of the royal box during the Gentlemen's Singles Final match between Roger Federer of Switzerland and Novak Djokovic of Serbia on day thirteen of the Wimbledon Lawn Tennis Championships at the All England Lawn Tennis and Croquet Club on July 6, 2014 in London, England. (Photo by Matthew Stockman/Getty Images).



There had been only one service break through the first three sets before a string of three straight in the fourth as Djokovic took a 4-2 lead before holding serve again.

Story continues below advertisement

Djokovic returns to the top ranking for the first time since last September, taking over from Rafael Nadal, who lost in the fourth round here.

The Serbian player first rose to No. 1 when he won Wimbledon in 2011, although he was already guaranteed of securing the top ranking even before beating Nadal in that final.

READ MORE: Local tennis players inspired by Canadians’ successes at Wimbledon

Djokovic fell awkwardly in the first game of the second set and called for a trainer immediately after he broke Federer’s serve to take a 2-1 lead. The trainer worked on Djokovic’s left ankle.

Djokovic again called for the trainer after the third game of the final set to have his right calf worked on.

Federer led 3-0 in the first-set tiebreaker but later had three unforced backhand errors to let Djokovic back into it and had to save a set point when the Serb hit a backhand into the net.

Watching Sunday’s final from the Royal Box were Prince William and his wife Kate, David Beckham and actors Bradley Cooper, Samuel L. Jackson and Chris Hemsworth.