HOUSTON -- Top-seeded Roger Federer wasn't at his best, but it was good enough.
Federer wasn't as sharp as in earlier performances and had to overcome a second-set lag before beating Carlos Moya 6-3, 3-6, 6-3 on Thursday night in a round-robin match at the ATP Masters Cup Championships.
Federer is 3-0 in the Red Group and is assured of the top billing for Saturday's semifinals. The loss damaged Moya's chances of advancing.
"Today was tough mentally," Federer said. "Going into the match knowing I am qualified and him knowing he needs win, that doesn't make it easy. He needed to win so much and I didn't need to win that much."
Federer ran his record to 21-0 against top 10 opponents since last year's Masters Cup.
Earlier, second-seeded Andy Roddick beat Marat Safin 7-6 (7), 7-6 (4) and is 2-0 in the Blue Group. The top two players in each group will play in Saturday's semifinals.
"He plays in 80 to 90 matches a year, so some are not going to be as good as others," Moya said. "Today, maybe he missed a few more shots but he's still No. 1."
Federer got the early upper hand by breaking Moya in the eighth game of the first set when the Spaniard double-faulted at break point. Moya broke Federer in the fourth game of the second set and then served out to take the set.
Federer narrowly avoided being broken again in the sixth game but saved two break points.
He boosted his lifetime record to 5-0 against Moya, who dropped to 1-2 in round-robin play. Federer increased his season match record to 72-6.
Federer got the advantage in the second game of the third set, breaking Moya at the fourth break point on an overhead.
Roddick and Safin remained on serve throughout the second set, though Safin had to save two break points in the third game and Roddick came back from three break points to hold in the 12th game and force the tiebreaker.
"I felt lucky to get through the first set," Roddick said. "The rest of the match, I couldn't ask for more. I thought that was some high-level tennis."
Roddick broke from a 3-3 deadlock in the second-set breaker with a 121 mph ace and didn't trail again. Safin made a running forehand error to bring on match point, and Roddick's 118 mph ace closed it out.
Roddick had to struggle to reach the second tiebreak, overcoming three break points in the final game of the set. After Safin got the third break point, Roddick served an ace to pull even. Roddick then went ahead on Safin's service return into the net. After the shot, Safin broke his racket by slamming it to the court.
"I didn't actually see it, but I looked up and saw two pieces of racket," Roddick said. "I'm sorry I missed it. He's up there with the best of them at breaking rackets."
Roddick finally forced the tiebreaker with a service winner.
With the score tied 7-all in the first-set tiebreak, Safin missed an easy volley and then stood watching the ball, his hands on his hips in disbelief. Roddick closed out the set with a forehand volley.
"I was just a bit unlucky. It's like I always say, tiebreaks are a lottery," Safin said. "I did everything right. I can't say that I made a huge mistake. But I had chances before to break him."
Also, Tim Henman overwhelmed Guillermo Coria 6-2, 6-2. Henman evened his record at 1-1, while French Open finalist Coria, still recovering from shoulder surgery, dropped to 0-2.
Coria, playing in his first tournament since July, was at a disadvantage on his serve, with many of his first serves dropping below 100 mph.
"Today I feel better than my match against Safin," Coria said. "I could do more things but I was a little disappointed with myself. It was 6-2, 6-2. I still had some chances."