LONDON — Novak Djokovic needed nearly four hours to taste victory Sunday, and in the end, after denying the devilishly sublime Roger Federer an eighth championship here, the Serbian star lingered a moment to graze on the Wimbledon lawn.

The 27-year-old Djokovic, kidding when he thanked Federer for “letting me win’’ his second championship here, dropped to his knees upon clinching a drama-filled fifth set, pinched a few blades of grass between his right thumb and index finger, and then placed the itsy-bitsy piece of hallowed turf into his mouth.

The final score: 6-7 (7-9), 6-4, 7-6 (7-4), 5-7, 6-4. The victory check was worth approximately $2.9 million, leaving the grass-fed champion a man of both wealth and taste (with apologies to an aging British rock band of some note). Wimbledon’s trademark strawberries and cream couldn’t ever have tasted so sweet.

“It tasted like the best meal I’ve ever had in my life,’’ said Djokovic, ecstatic over his first Slams victory since his win in Australia at the start of 2013. “Believe me.’’

Get Sports Headlines in your inbox:

The Globe's most recent sports headlines delivered to your inbox every morning.

As is often the case here, especially on the men’s side of the tournament, it was a mesmerizing championship tug-o-war that lasted 3 hours 56 minutes, and included 58 games, all sandwiched around first- and third-set tiebreakers that totaled 27 points. On an afternoon that turned brighter and warmer over the hours, the opponents delivered sparkling shots under pressure and each relied heavily — perhaps too much at times — on their contrasting telltale strengths.

The women’s final on Saturday had the Czech Petra Kvitova ridding Canada’s Eugenie Bouchard, 6-3, 6-0, in a ho-hum, suspense-free match that took all of 55 minutes, the Venus Rosewater Dish all but handed Kvitova at the Wimbledon Shop drive-thru window. If that was speed dating, then Djokovic and Federer was a tennis lover’s long bromance.

For everything the women’s side wasn’t, the men’s side was, with the full-house Centre Court crowd delighting in the dalliance.

Djokovic, perhaps the greatest returner in the game’s history, time and again fashioned what looked like lost causes into winners, many of them delivered on clever, pinpoint passing shots as the more aggressive Federer repeatedly and increasingly forced the action with approaches to the net. So diverse was Federer, in the fifth set he even pulled off a rare serve and volley on second serve, erasing a break point and going on to level the set, 4-4.

“That’s why he has been winning so many Grand Slams,’’ said Djokovic, praising Federer’s guile and execution with the serve and volley on second serve. “He feels confident to play these shots at the important time.’’

Federer, tied for the AELTC record with seven men’s single championships, for the day smacked a robust 29 aces (more than twice Djokovic’s 13), displaying once more why many believe he is the sport’s best all-time server. He was the attacker, Djokovic the defender, and on this day defense and stealth return on serves and volleys provided the foundation of a championship.

Perhaps ironically, Federer felt it was Djokovic’s serve, and the Swiss master’s inability to do much with it, that ultimately proved the difference in the match.

“The way I approached the return — also how I [ineffectively] played the rallies from the baseline, because I felt there were opportunities and options for me to do different things,’’ noted Federer, adding that he felt he rarely put sufficient or adequate pressure on his opponent. “I really felt that was my biggest problem overall. I think that’s where I lost the match. I served well myself throughout. But like I said, credit to him for doing it as long as he did.’’

The difference between the two indeed was minimal. Federer committed 29 unforced errors to Djokovic’s 27. Federer produced 75 winning strokes to Djokovic’s 68. To no one’s surprise, the baseline-hanging Djokovic collected 35 winners from the baseline to Federer’s meager 11, but then Federer held nearly the same advantage in net winners (31-15). The one marked difference throughout was Federer all too often shooting wide or long with baseline returns. Rarely erratic in any facet of the game, he was, at best, spotty with those deep-ball attempts. Had he done a better job from there, he very well could have prevailed, surpassing Pete Sampras and William Renshaw for an eighth title.

“I already have seven . . . it’s not like I need another one,’’ said Federer, noting how pleased he was over the crowd’s obvious support and how he wished he could have come through for the fans. “But it would have been awfully nice to have it. I know they love tennis. They’ll love tennis after we’re all gone. So the game is bigger than anyone. I’m very much aware of that. I definitely appreciated [the support] in a big way.’’

Djokovic appeared to have clear passage after clipping the third set, taking a 2-1 lead, with a two-point flurry on serve that clinched the tiebreaker, 7-4. He picked up the sixth point with a forehand kill shot to the corner that Federer couldn’t track, then clinched when Federer once again could not convert one of his patented backhand shots from the baseline.

The fourth set was the wildest, with three consecutive breaks that had Djokovic serving to a 5-2 lead, the match looking as if it would close out in about three hours. But Federer broke back to 4-5 in the ninth game, came even (5-5) on serve, and then broke Djokovic again, this time the Serb firing long with a forehand from the baseline. The unforced errors were turning contagious back there.

Federer pulled even in the match by breezing through another game that included his 26th ace of the day. He had the momentum and he had Djokovic thinking, second-guessing.

In the final set, the first fifth-setter here since 2009, Federer twice held off break points in the eighth game to level it, 4-4. Djokovic then went ahead on serve, then clinched the title, 6-4, when Federer opened at 0-30 and ultimately broke when he netted yet another backhand, once again from the hard-packed baseline that proved to be his quicksand.

“The most special Grand Slam final that I have played,’’ said Djokovic, a young boy of 5 when he first saw a tennis match on TV, a match broadcast from Wimbledon grounds. “At this time of my career, for this Grand Slam title to arrive is crucial. After losing several Grand Slam finals in a row, I started doubting, of course. I needed this win a lot.’’

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.