On Friday, when 32-year-old Roger Federer played 22-year-old Grigor Dimitrov in the quarterfinals in Basel, we heard talk of a changing of the guard moment in men’s tennis—or at least a changing of the guard moment among guys who play a lot like Roger Federer. Less than 24 hours after keeping that guard intact, though, Federer had to face another one when he went up against 23-year-old Vasek Pospisil in the semifinals. Age prevailed again today, 6-3, 6-7 (3), 7-5, but as the scores indicate, this time it was close.

For the better part of two sets, it didn’t look like it would end up that way. In the match’s second game, Federer, with wind in his sails and a spring in his step after yesterday’s victory, snapped off a brilliant cross-court backhand pass to break. At 4-3, he saved a break point, and then broke a reeling Pospisil again, at love, to close the set.

The second seemed destined to end in similar fashion after the Canadian drilled a forehand into the net to surrender his serve at 3-4. Federer began the next game with another backhand pass, this time up the line, and he appeared to have the second point won as he ran forward to knock off a sitter forehand. Except that Federer kept running...right through the shot...which he slapped into the net. We didn’t know it at the time, but the match would turn in Pospisil’s direction from there, and it almost didn’t turn back.

Pospisil is currently ranked No. 40, but he’s been rising through 2013, and over the course of the second half of this match, he showed why. The Canadian took Federer’s forehand gift, broke serve, and ran away with the tiebreaker a few minutes later. He attacked well with his forehand, showed surprising speed and court coverage for someone 6’4”, and answered Federer’s one-handed backhand pass with a clutch two-hander of his own at 5-3 in the breaker. Dimitrov is the more elegant player, but you have to think Pospisil’s upside is just as big. He has a more powerful serve, though he showed he could win without today it. Vasek made just 42 percent of his first balls yet pushed Federer to the limit on his home court.

That push extended into the third set, when Pospisil broke a suddenly error-addled Federer for 3-1. The Basel crowd sat in stony silence as their man hit four straight balls out—what was he doing out there? But hope, in the form of nerves and inexperience, was on the way. If Federer’s duffed forehand at 5-3 in the second turned the match one way, Pospisil’s first backhand at 3-1 turned it the other. This was the first time he had a clear lead, and it showed. He started his service game by flipping his tightest backhand of the match into the bottom of the net. But it wasn’t just nerves that cost him in this situation. Pospisil attacks and defends well, but he can struggle when he has to get down for in-between shots that come in low and short, shots that Federer has always loved to throw at his opponents. Federer broke a minute or so later with another backhand pass.

And it was that shot that would save Federer in the end. At 5-5 in the third, having saved a break point three games earlier, Federer pushed Pospisil on his serve. The two went back and forth across multiple deuces. Federer kept himself alive with a crosscourt backhand pass, and reached break point with another up the line. Finally, on Federer’s fourth break chance, Pospisil blinked and hit a forehand long. Federer served for the match a second time, and this time he closed it the best way he knows how, with three service winners.

Federer was mostly stifled on his return, he had trouble defending his forehand corner at times, he lost confidence from late in the second through the middle of the third, and he hit just four aces in 2 hours and 40 minutes, compared to his opponent’s 11. At the same time, Federer’s backhand pass was brilliant, he had his serve when he needed it, and in the third set he rebounded from the type of inexplicably inconsistent run of play that has doomed him on other occasions this year.

In the end, he’s in his 10th final in Basel, where he’ll try to avenge his loss to Juan Martin del Potro in the same round last year. If Federer does win, he’ll guarantee his 12th straight appearance in the World Tour Finals. For today, the guard remains to be changed.