File it alongside those tear-soaked narrow British sporting failures rather than in the slimmer companion volume of famous triumphs.

Andy Murray came the closest of any British man to winning Wimbledon since Fred Perry won here in 1936, falling agonisingly short of ending one of the country's most enduring sporting obsessions against a player regularly described as the best of all time.

The Scot raised hopes by winning the first set but ultimately succumbed in four sets to Roger Federer, who secured his seventh Wimbledon title to move level with his hero, Pete Sampras, and William Renshaw at the head of the all-time list of male winners.

The Swiss started with uncharacteristic nerves but his Grand Slam experience and tactical brilliance – not to mention faultless tennis in the third and fourth sets – eventually overcame Murray, who played with aggression and verve but fell just short.

Murray's dry humour remained intact afterwards despite the crushing disappointment. "I'm getting closer," he joked, but then choked with tears as he addressed the crowd, his family and support team in his box.

"Everyone who's supported me, you've done a great job, so thank you. And last of all to you guys … everybody always talks about the pressure of playing at Wimbledon, but the people watching make it so much easier to play. The support's been incredible," he said, as a wave of sympathy rolled down from the stands.

The Duchess of Cambridge, David Cameron, David Beckham, Boris Johnson and a royal box that resembled the pages of Hello! magazine brought to life, watched as Federer was able to display the full repertoire of talents that took him back to number one in the world at the age of 30.

The majority of the centre court crowd, some of whom had paid more than £5,000 to be there, backed Murray but there was also vocal support for Federer.

It was apt, in the midst of a sporting summer likely to be dominated by anxious glances skywards and endless discussion of the weather, that the match should begin under bright sunshine, be suspended for a biblical downpour at one set all and finish under the artificial light of the Centre Court roof.

As surely the whole country knew bySunday, there had not been a British presence in the men's singles final since Bunny Austin was runner-up in 1938 – and no homegrown winner since Perry in 1936.

Murray displayed all the qualities that had taken him this far. A nervelessness that is not normally considered part of the British sporting psyche – and no small level of skill – were demonstrated during a lengthy battle to hold his serve in the seventh game of the first set. He broke Federer's serve in the very next game and went on to take first blood.

But then it was Federer's turn to display the precision and killer instinct that has now taken him to 17 Grand Slam titles. While Murray failed to take advantage of four break points in the second set, the ice-cool Swiss needed just one opportunity to take it 7-5 with a killer stop volley.

Federer, any sign of nerves long since gone, began to move through the gears and display the sort of tennis that has made Centre Court his second home. "Roger, you're the King of this court," yelled one of the handful of over refreshed punters who tried the patience of the umpire.

Murray's coach, Ivan Lendl, whose own glittering career was missing only a Wimbledon title, has been credited by the Scot with regulating his emotions on court. That newfound inner strength was sorely tested at the beginning of the third set but with the match locked at one set all and one game all, the heavens opened.

Lendl sat stony-faced throughout, his chin on his hands and his thoughts hidden behind his cap and sunglasses. After the rain delay neccesitated the use of the Centre Court roof, Federer turned the screw. The Dunblane-born 25-year-old tried to stem the tide of Federer winners, but was left dumped on his backside both physically and metaphorically more than once during an epic sixth game. At one point he led 40-0, but ended up succumbing after 10 deuces and six break points. Federer went on to take the set and, while Murray kept fighting, the tide was very much in his favour.

Afterwards, Murray struggled to keep his emotions in check. "I'd be playing the wrong sport if I wasn't emotional. I played a pretty good match, there were a lot of close shots and a lot of close games," said Murray afterwards. "The atmosphere was unbelievable, one of the best I've played in."

Murray said it had been a "great couple of weeks", that he'd "dealt with the extra things away from the tournament better than in the past" and delivered his best performance in a Grand Slam. In short, he'd be back.

In their two previous meetings at Grand Slam finals – the US Open in 2008 and the Australian Open – Murray had not managed to take a set off Federer. The 25-year-old will be back here in less than three weeks for the Olympics, at which point the nation will again break out the union flags and the emotional rollercoaster will restart.