Chicago White Sox pitcher Mark Buehrle threw a perfect game on Thursday by retiring all 27 batters he faced in a 5-0 victory over the Tampa Bay Rays.

Buehrle became the 18th Major League Baseball pitcher to record a perfect game, in which no opposing batter reaches base, when he got Jason Bartlett for the last out on a grounder to short.

Two batters earlier, Buehrle's bid for perfection was threatened by a long drive off the bat of Gabe Kapler.

Center fielder Dewayne Wise, inserted in the ninth for defensive purposes, preserved the perfect game when he leaped over the wall to snare the ball, which stuck in the top of his glove and popped loose with Wise juggling it before securing with his bare hand as he fell to the ground.

After the final out, Buehrle clamped his mitt on his head and wore an expression of disbelief as teammates mobbed him by the mound.

Winning the World Series (in 2005) was the greatest. But as a personal goal...this tops them all, Buehrle told a television interviewer after the game.

Buehrle received a congratulatory phone call from President Barack Obama, a White Sox fan, who appeared at last week's All-Star game in a White Sox jacket.

As a fan it is extraordinary, Obama said. When you are a White Sox fan and you know the guy who did it, it makes it even more fun.

Buehrle, who also threw a no-hitter in 2007, struck out six as he improved to 11-3 and lowered his ERA to 3.28.

The 30-year-old left-hander got all the support he needed from Josh Field's grand slam homer in the second inning off losing pitcher Scott Kazmir (4-6).

Buehrle, a fast worker on the mound, kept the Rays off balance throughout, mixing an excellent change-up and curve with a pinpoint fastball before 28,036 fans.

I never thought I'd throw a no-hitter, I never thought I'd throw a perfect game, I never thought I'd hit a home run, said Buehrle, who earlier this season hit one over the fence at Milwaukee.

So I said never say never in this game because crazy stuff can happen.

Asked if he owed Wise a steak dinner for his brilliant catch, Buehrle replied: I think I owe him more than that.

I bought the guys watches, everybody on the team, last time I threw a no-hitter. That was an expensive no-hitter and this will probably be a lot more expensive.

The last perfect game was thrown by Randy Johnson for the Arizona Diamondbacks in 2004.

(Reporting by Andrew Stern in Chicago, Ross Colvin in Shaker Heights, Ohio. Writing by Larry Fine in New York, Editing by John Mehaffey)