Stefan Edberg made sure of ending the year as the top-ranked player in the world by beating Pete Sampras 7-5, 6-4 on Friday to advance to the semifinals of the ATP World Championships in Frankfurt, Germany.

Edberg, the Wimbledon champion who took over the No. 1 spot on Aug. 13, broke Sampras once in each set and eliminated the U.S. Open champ from the tournament.Boris Becker earlier kept alive his hopes of finishing the year on top of the rankings by coming from behind to beat Ivan Lendl 1-6, 7-6, 6-4 - forcing Edberg to win. Both Becker and Lendl had assured themselves of semifinal berths on Thursday.

Edberg, the defending champion, will play Lendl in the semifinals, while Becker will face Andre Agassi. Becker and Edberg finished the round-robin portion of the tournament at 3-0, while Lendl and Agassi were 2-1.

Sampras, at 19 the youngest player in the tournament, finished 1-2.

"I am disappointed not to qualify, but it's been a good year for me," Sampras said.

Sampras became the youngest male champion at the U.S. Open. He also made the biggest rise ever in the ATP computer rankings by jumping from No. 81 at the end of 1989 to No. 5.

Sampras said he was still considering whether to play at next month's $6 million Grand Slam Cup, the richest tournament in tennis history.

The ATP has been opposed to the controversial event, which is being run by the International Tennis Federation and the chairmen of the four Grand Slam Tournaments.

Agassi, who like Sampras has signed a contract to play at the Grand Slam Cup, on Thursday announced he was pulling out and risks being banned from one or more Grand Slam events.