(CNN) -- Roger Federer secured a record-equaling seventh Wimbledon title to dash the hopes of Andy Murray and a partisan Centre Court crowd. 

Federer made it 17 grand slam titles to his name after a two-and-a-half-year drought and matched the haul of American Pete Sampras at the All England Club. 

The Swiss will return to the top of the world rankings as a result of his 4-6 7-5 6-3 6-4 victory, meaning he will match his hero Sampras' record of 286 weeks at No. 1. 

For Murray, the first Briton to reach a men's singles final at Wimbledon in 74 years, it represented his fourth defeat in major finals, and his pain was acutely felt by a fervent crowd at Wimbledon. 

Sampras: I hated (and loved) Wimbledon 

Federer's triumph was his first at Wimbledon since 2009, with his last major win coming at the Australian Open in 2010 when he also beat Murray. 

"It's amazing," Federer told the host broadcaster. "It equals me with Pete Sampras, who is my hero, so it feels amazing. 

"I think I played some of my best tennis in the last couple of matches. It's worked out so many times here that I play my best in semis and the final. I couldn't be more happy -- it feels being great being back here as the winner. It's a great moment." 

Federer's victory means he is only the second player in the men's game to have held the top ranking over the age of 30, alongside Andre Agassi. 
How did Sampras feel about Wimbledon?
Who is Federer's Idol?
Are their records the same now?
How many Wimbledon titles does Federer have?
How many grand slam?
Where will this put the Swiss?
How long has he been there?
Who else spent that long there?
When was the last time he won at Wimbledon?
What did he win in 2010?
Who did he beat?
Is he older than 30?
Is he the only one that old to have kept the top rank?
How many others?
Who?
Who did he win against to get his seventh Wimbledon?
How many times has he lost in major finals?
Was the crowd disappointed?
Where is he from?
When was the last time they had a man in the singles final at Wimbledon?
He hated and loved Wimbledon
Sampras: I hated (and loved) Wimbledon 
Sampras
his hero Sampras' 
Yes
he will match his hero Sampras' record of 286 weeks at No. 1
Seven
Roger Federer secured a record-equaling seventh Wimbledon title
17
Federer made it 17 grand slam titles to his name
the top of the world rankings
The Swiss will return to the top of the world rankings
286 weeks
he will match his hero Sampras' record of 286 weeks at No. 1.
Sampras
he will match his hero Sampras' record of 286 weeks at No. 1.
2009
Federer's triumph was his first at Wimbledon since 2009
the Australian Open
his last major win coming at the Australian Open in 2010 when he also beat Murray. 
Murray
his last major win coming at the Australian Open in 2010 when he also beat Murray.
Yes
Federer's victory means he is only the second player in the men's game to have held the top ranking over the age of 30, alongside Andre Agassi.
No
Federer's victory means he is only the second player in the men's game to have held the top ranking over the age of 30, alongside Andre Agassi. 
One
Federer's victory means he is only the second player in the men's game to have held the top ranking over the age of 30, alongside Andre Agassi.
Andre Agassi
the second player in the men's game to have held the top ranking over the age of 30, alongside Andre Agassi.
Andy Murray
Roger Federer secured a record-equaling seventh Wimbledon title to dash the hopes of Andy Murray
four times
it represented his fourth defeat in major finals
Yes
his pain was acutely felt by a fervent crowd at Wimbledon. 
Britain
Murray, the first Briton to reach a men's singles final at Wimbledon in 74 years
74 years ago
For Murray, the first Briton to reach a men's singles final at Wimbledon in 74 years