Undeterred by an on-court intruder, Federer defeated surprise finalist Soderling 6-1, 7-6 (1), 6-4 on Sunday to complete a career Grand Slam and win his 14th major title, matching Sampras' record.
"It's maybe my greatest victory, or certainly the one that removes the most pressure off my shoulders," Federer said. "I think that now and until the end of my career, I can really play with my mind at peace, and no longer hear that I've never won Roland Garros."
On his fourth try in a Paris final, Federer became the sixth man to win all four Grand Slam championships.
"Now the question is: Am I the greatest of all time?" Federer said. "We don't know, but I definitely have many things going for me because I've finally won all four Grand Slams, and I'm particularly happy reaching Pete's 14."
Sampras said Federer deserves to be at the top of the all-time list.
"I'm obviously happy for Roger," Sampras told The Associated Press in a telephone interview from Los Angeles, where he lives. "Now that he has won in Paris, I think it just more solidifies his place in history as the greatest player that played the game, in my opinion."
Midway through the match, a spectator ran onto the court and tried to put a hat on Federer. That only briefly delayed Federer's march to the title.
When the stylish Swiss hit a service winner on championship point, he fell on his knees to the clay that had vexed him for so long, screamed and briefly buried his face in his hands. He was teary by the time he met Soderling at the net, and fans gave Federer a standing ovation as he raised his arms in triumph.
The supportive crowd included Andre Agassi, the most recent man to complete a career Grand Slam when he won at Roland Garros 10 years ago. Agassi presented Federer with the trophy.
"I'm so happy for you, man," Agassi said.
"You're the last man to win all four Grand Slams," Federer said. "Now I can relate to what it really feels like. ... It feels good to be for once on the podium as the winner. It's a magical moment."
Tears ran down Federer's cheeks as the Swiss national anthem played.
"Roger, really, congrats to you," Soderling said. "You really gave me a lesson in how to play tennis today. And to me you're the greatest player in history. So you really deserved to win this title."
Federer owed Soderling a thank-you for easing his path by upsetting four-time defending champion Rafael Nadal in the fourth round.
"I kind of was relieved, because he was going to be the hardest one to beat," Federer said.
Nadal defeated Federer at Roland Garros the past four years, including three consecutive times in the final.
A matchup against the No. 23-seeded Soderling was much more inviting. The Swede had never previously been beyond the third round at a Grand Slam tournament, and he fell to 0-10 against Federer.
"Yesterday, me and my coach were joking," Soderling told Federer during the trophy ceremony. "You've beaten me nine times in a row, and we were joking nobody can beat me 10 times in a row. But we were wrong."
Playing in cool, windy weather and occasional rain, Federer raced to a quick lead and kept it. Soderling appeared nervous at the start of his first Grand Slam final, and Federer kept him scrambling with penetrating groundstrokes to both corners and an occasional drop shot.
Then came the day's biggest surprise. The match was between points in the second set when a spectator waving a flag climbed through the photographer's pit and onto Federer's side of the court.
"That gave me a fright," Federer said. "He looked at me, and I was not sure what he wanted. ... It was a touch scary."
Federer backed away toward the backstop, but the fan caught up with him and tried to put a hat on Federer's head. Security personnel seemed slow to react before chasing the man to the other side of the court, and he was tackled, then carried out.
There was silence from the stunned crowd, then the familiar chant of "Ro-ger! Ro-ger!" when the bizarre episode ended. Federer readjusted his headband, Soderling gave him a thumbs-up sign and play resumed.
Soderling's strokes steadied, and he pushed the second set to 6-all. But Federer played a brilliant tiebreaker, hitting aces on all four of his service points, and Soderling could only smile ruefully.
Federer broke again to start the third set and kept that lead the rest of the way. He never lost serve, and despite the difficult conditions, he had more winners than unforced errors -- 41 to 24.
While Federer benefited from Nadal's surprising departure, the journey to the title wasn't easy. Federer rallied from a two-set deficit in the fourth round to beat Tommy Haas, and survived another five-setter against Juan Martin del Potro in the semifinals.
"I've had a tough draw," Federer said. "Of course, it's not Nadal on the other side of the net, but I beat him a couple of weeks ago on clay [in Madrid], so I really feel like I really deserve it."
Federer won his 14th Grand Slam championship at age 27. Sampras, who never reached a French Open final, was 31 when he won his last major title. Federer will try for No. 15 beginning in two weeks at Wimbledon, which he has won five times.
He has also won the U.S. Open the past five years, and he has three Australian Open titles.
Besides Federer and Agassi, the other men to win all four Grand Slams tournaments were Fred Perry, Don Budge, Rod Laver and Roy Emerson.