Roger Federer left the door tantalisingly ajar for local hero Andy Murray in the Wimbledon men's singles final, then slammed it shut to win a record-equalling seventh Wimbledon title and in so doing return to the top of the world rankings.
The Swiss great, contesting his eighth final at the All England Club, flirted with danger in the second set after losing the first but just when Murray looked like ending 76 years of plucky British failure Federer gave a stunning reminder of his genius to win 4-6 7-5 6-3 6-4 on Centre Court.
When a Murray forehand looped narrowly wide after three hours 24 minutes of enthralling action, Federer dropped to the turf in joy, just as he did in 2003 when he beat Australia's Mark Philippoussis to begin a grand slam collection that now stands at 17.
For the second time in three grand slam finals against Murray he reduced the Scot to tears, although this match, unlike the others, was a contest to savour.
It was only after Centre Court's translucent lid was slid across after heavy rain began to fall in the heart of the final that Federer took charge, striding to the win that puts him level with Pete Sampras's record of seven Wimbledon crowns.
At 30 years and 335 days he also became the oldest men's champion since Arthur Ashe in 1975 and, to put the icing on the cake, Monday's ATP rankings will show him back at No. 1 for the first time in two years and he will equal Sampras's record of 286 weeks at the summit.
"I played some of my best tennis in the last couple of matches," Federer said after raising the trophy with his wife Mirka and giggling twin daughters Charlene Riva and Myla Rose watching on from the players' box.
"I've missed playing in the finals, and it feels like a great moment. I've gone through some struggles, so this one comes at the right time," added Federer, whose last grand slam title was at the 2010 Australian Open.
For Murray, his girlfriend Kim Sears and many of the thousands watching the huge screen on Henman Hill under a forest of multi-coloured umbrellas, there was just despair.
"I'm getting closer," Murray, whose valiant effort was watched by Royal Box guests Prime Minister David Cameron, David Beckham and Prince William's wife Kate Middleton, choked as applause rang out.
"I was told after my semi-final that this was my best chance, Roger's 30 now, but he's not bad for a 30-year-old, he played a great tournament. Congratulations, you deserve it."
While Federer basked in the glow of another major title, Murray was left to contemplate equalling coach Ivan Lendl's unwanted record of losing his first four grand slam finals.
A gracious Federer had words of encouragement.
"I think he's giving himself so many looks at big titles. I really do believe deep down in me he will win grand slams, not just one," Federer told reporters.
By defeating Jo-Wilfried Tsonga on Friday, Murray had become the first British man to reach the final since Bunny Austin in 1938 and as the players set foot on a sunlit Centre Court, there was an electric buzz of anticipation that he would emulate the 1936 title of Fred Perry.
Having failed to win a set in two Australian Open finals and one U.S. Open one, Murray would have been excused early match nerves but he came out firing to break Federer in the opening game of the match.
Federer quickly restored parity and wasted break points when leading 4-3 as Murray's first serve misfired.
The Swiss was made to pay in the following game, sloppily dropping serve and Murray closed out the opening set with ease to a deafening roar from the 15,000 crowd.
Murray was the more threatening player in the second and upped the ante at 4-4 only to squander two break points that would have given him the chance to serve for a two-set lead and leave Federer facing a daunting task.
"The second set I had some chances and didn't quite get them," Murray said. "Often what happens is matches change over a couple of points here and there."
That was the case as Federer seized his chance. A tiebreak loomed but, out of nowhere, Federer conjured a set point with an exquisite drop shot and grabbed it with another stunning volley after a mesmerising rally.
The crowd sighed and then the rain began to fall, a prelude to the British tears that were to flow later.
After a 40-minute break while the roof was rolled into position, the players returned, only this time Federer looked a different player - dominating rallies with a dazzling mixture of power, spin and clever angles.
Had Murray survived a marathon service game at 2-3 in the third, things may have been different, but when Federer struck on his sixth break point it proved to be the beginning of the end for the fourth seed who took several tumbles.
Federer hammered another nail in the coffin with a backhand winner to break midway through the fourth set and despite chants of "Murray...Murray" echoing around the court, kept his cool to close out the match on his second match point.
"It was crazy how it all happened under the circumstances," said Federer, of the first Wimbledon singles final to be partly played under the roof. "I'm happy that closing the roof maybe helped me today."
The roof stayed closed as Americans Mike Bryan and Lisa Raymond won the mixed doubles title with a 6-3 5-7 6-4 victory over the Indian/Russian duo of Leander Paes and Elena Vesnina.
ROGER FEDERER FACTBOX:
MAKING HIS NAME
* Born Aug. 8, 1981 in Basel, Switzerland.
* Bursts on to the scene in 2001 when he ends Pete Sampras's 31-match winning streak at Wimbledon in the fourth round before losing in the quarter-finals.
RECORD 17 GRAND SLAM TITLES Wimbledon, 2003-2007, 2009, 2012; U.S. Open 2004-2008; Australian Open 2004, 2006, 2007, 2010; French Open 2009.
* In 2003, becomes the first Swiss man to win a grand slam after beating Mark Philippoussis in the Wimbledon final.
* Is the only man to win five consecutive titles at two different grand slams - Wimbledon and U.S. Open.
* Is the first man to win Wimbledon-U.S. Open double four years in a row.
* Is the only man in the professional era to win three consecutive majors twice in his career when he captured the 2007 Australian Open title.
* Equalled Bjorn Borg's record of five consecutive Wimbledon titles in 2007.
* His run of reaching 10 consecutive grand slam finals is snapped by Novak Djokovic in the 2008 Australian Open semi-finals.
* The 2008 five-set epic at Wimbledon is regarded by many as the best ever tennis match. He lost the match to Rafael Nadal.
* His 2009 French Open crown made him the sixth man - after Fred Perry, Don Budge, Rod Laver, Roy Emerson and Andre Agassi - to have won all four grand slam titles during his career. Nadal has since become the seventh to achieve the feat.
* Breaks American Pete Sampras's record of 14 grand slam titles with his 15th win in the 2009 Wimbledon final to reclaim the world number one spot from Nadal.
* In 2009, becomes the first man to reach seven successive Wimbledon finals since the abolition of the Challenge Round in 1922. Reaches a record-equalling eighth Wimbledon final in 2012, extending his overall major final appearance record to 24.
* His record run of reaching 23 consecutive grand slam semi-finals is snapped by Robin Soderling in the last eight of the 2010 French Open. That record is widely considered as one of the most astonishing in sport as it means Federer finished in the top four at a major for almost six successive years. His streak is more than double the previous record held by Ivan Lendl, who reached 10 consecutive major semis.
OTHER CAREER MILESTONES
* Becomes the 23rd man to top the ATP rankings in 2004, and keeps the ranking for a record 237 consecutive weeks. By winning his seventh Wimbledon title, he also matches Sampras's record of spending 286 weeks as world number one.
* Holds a record run of 24 consecutive final victories, which was snapped when he lost 2005 Masters Cup final to David Nalbandian. Finished the season with an 81-4 win-loss record.
* In 2006 he reached all four grand slam finals, winning in Australia, Wimbledon and the U.S. among a haul of 12 titles and a 92-5 win-loss record.
* Has a professional era record of 65 consecutive wins on grass, which was ended by Nadal in the 2008 Wimbledon final.
* Won an Olympic men's doubles gold medal with Stanislas Wawrinka at the 2008 Beijing Games.
* Suffered from a bout of glandular fever at the start of the 2008 season which affected his form.
* Married long-time girlfriend Mirka Vavrinec in April 2009 and celebrated the arrival of twin daughters three months later.