WIMBLEDON, England 
As the rain gave way to sunshine and the start of the Wimbledon men’s final approached, lovers, friends and families took their turns posing in front of the Fred Perry statue that sits at an entrance to Centre Court.

This was the day when Perry, the last British man to win the singles title here in 1936, might finally get company: the day when Andy Murray was to play the final against Roger Federer.

It would have been quite something; a national moment; a thunderous start to London’s Olympic summer. But nobody in men’s tennis does history quite as well as Federer, and though Murray played brilliantly, even bravely at times in this outdoor-indoor final, Federer was the one who ended up falling to the grass in jubilation after a match point. Federer had milestones of his own to celebrate.

Federer’s 4-6, 7-5, 6-3, 6-4 victory gave him a seventh Wimbledon singles title, which ties the men’s record shared by William Renshaw and Pete Sampras. The win also increased Federer’s record total to 17 major titles after being stuck on No. 16 for 2½ years, and clinched a return to the top of the ATP rankings, overtaking Novak Djokovic, after an absence of a little more than two years. Federer’s 286th week at No. 1 ties Sampras for the most in history.

As for No. 1: “As we know, the world No. 1s, you don’t get those gifted,” Federer said. “I never stopped believing.”

Sunday’s final started outdoors but was stopped because of rain at 1-1 in the third set after 2 hours and 2 minutes of play with Federer serving at 40-0. The decision was quickly made to close the retractable roof over Centre Court and when Federer and Murray resumed play 40 minutes later, they were playing indoors.

Murray, the 25-year-old Scot, has now lost to Federer in three Grand Slam singles finals and has lost his first four major finals overall. The only other man in the Open era to lose his first four major singles finals is Ivan Lendl, who ultimately won eight major titles and has been coaching Murray since last December.

But Murray has yet to make his breakthrough, and it was perfectly understandable that he struggled to keep his emotions in check as he addressed the Centre Court crowd after the match. Even if he had become the first British man to reach the final since Henry Austin, better known as Bunny, in 1938, this still felt like a letdown.

“I’m getting closer,” the fourth-seeded Murray said through the tears, with his mother, Judy, and girlfriend Kim Sears crying in the players box along with a number of fans with no direct connections to Murray.

“I’d like to congratulate Roger,” Murray said when he finally recovered his composure. “I was getting asked the other day after I won my semifinals, ‘Is this your best chance? Roger’s 30 now.’ He’s not bad for a 30-year-old. He played a great tournament. I thought he had some struggles early on with his back and showed what fight he still has left in him. So congratulations, you deserve it.”