WIMBLEDON, England—For Roger Federer, it might have been a last great hurrah.

Time and a young Canadian caught up with Federer on Friday in the Wimbledon men’s semifinals, with Milos Raonic scoring a 6-3, 6-7 (3), 4-6, 7-5, 6-3 win in what appeared to be a changing of the guard.

It was the first time Federer lost in the Wimbledon semifinals in 11 appearances.

In the other semifinal, persistent Andy Murray, the No. 2 seed — and, because he is British, no worse than the fans’ No. 2 favorite behind Federer — easily defeated Tomas Berdych of the Czech Republic, 6-3, 6-3, 6-3.

Murray, 29, who ended a 76-year drought for British men’s tennis when he won Wimbledon in 2013, faces the 25-year-old Raonic in the final Sunday and surely will be the choice for a second title.

advertisement | advertise on newsday

“Andy’s played better than anyone in the tournament” was the comment on television by John McEnroe, who interestingly enough is one of Raonic’s coaches and whose advice — “Go out there and leave it all out there” — contributed to the win.

And to Federer’s disappointment. A month from his 35th birthday and after a great rally from two sets down against Marin Cilic in the quarterfinals, Federer would seem to have run out of chances for an eighth Wimbledon title.

“This one hurts, clearly,” said Federer, whose last Wimbledon, and Slam, victory came in 2012. “I could have had it. I was so close. If he blinks at the wrong time, if I connect on a 130 [mph] serve, we’re doing a different press conference. But credit to him.”

Raonic (pronounced Rownish) was born in what used to be Yugoslavia, moved with his parents to suburban Toronto when he was 3 (he’s a Maple Leafs, Blue Jays and Raptors fan) and took up tennis as a kid. The 6-5 Raonic has a blistering serve (his best was 144 mph) and moves well.

But Federer, winner of a record 17 Grand Slam tournaments, could only second-guess himself for mistakes he never would have made in his prime. In the fourth set, he was unable to convert on three break points, two in one game. Then Federer went up 40-0 on serve at 6-5 but couldn’t hold, serving two double faults in succession.

@NewsdaySports

“I can’t believe I double-faulted twice,” he said. “Unexplainable for me. Very sad about that and very angry with myself.” Still, Federer said consecutive five-set matches gave him belief: “I was insecure coming into Wimbledon.”

Murray, in his third straight Slam final of the year — he lost at Australia and the French to Novak Djokovic, who was ousted here in the third round — has dropped only one set in six matches.

“The older you get,” Murray said, “the more the experience helps.

In a grass-court prep for Wimbledon three weeks ago at Queen’s Club, he beat Raonic in the final, 6-7, 6-4, 6-3. “Yes,” Murray said, “but it was a very tough match.’’