(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. 
Who did he beat?
his last major win coming at the Australian Open in 2010 when he also beat Murray.