MINNEAPOLIS -- Denard Span's usual approach to leading off a game is to take the first pitch.

But on Tuesday night, the Twins leadoff hitter was up at the plate against White Sox ace Mark Buehrle swinging at the first offering from the southpaw.

"I don't ever do that," Span said. "I was just trying to get the perfect game out of the way."

If only it had been that easy to stop.

In making a bid to become the first pitcher in Major League history to toss back-to-back perfect games, Buehrle spent the early part of Tuesday's outing looking like the same unhittable pitcher that shut down the Rays just five days earlier in Chicago.

The White Sox lefty was perfect through 5 2/3 innings and set a Major League record of 45 consecutive batters retired before the Twins were finally able to get to him in a 5-3 victory over Chicago at the Metrodome.

The Twins scored all five of their runs in Buehrle's final two-thirds of an inning to pick up their third straight victory and move into a tie with the White Sox for second place in the American League Central, two games back of the division-leading Tigers.

But it was a victory that looked like a long shot early on as Buehrle picked up right where he left off against the Rays, cruising through the early part of his outing against the Twins with ease.

"We've faced this guy so many times and we've watched him pitch so many times," Twins manager Ron Gardenhire said. "It's a race track out there, and all we were saying in the dugout is, 'Slow down. You've got to slow him down a little bit, because once he gets on a roll like that, he can mow right through you.'"

Buehrle retired 12 straight to start the contest and extend his consecutive outs streak to 40, putting him just one away from tying the Major League record of 41 which had previously been set by White Sox closer Bobby Jenks (2007) and the Giants' Jim Barr (1972).

He then tied the record in the fifth by striking out Michael Cuddyer to start the inning and established a new mark at 42 consecutive outs by getting former teammate Joe Crede to ground out to the shortstop.

And the deeper he got into the game, the closer Buehrle looked to doing something that seemed unfathomable -- repeating perfection.

"It seemed like for the first six innings, nobody hit the ball on the barrel," Span said. "Everybody was getting out and just five-hoppers to the infielders. This is the best I've ever seen [Buehrle]."

But on this night, Span and the rest of the Twins offense seemed determined not to let Buehrle rack up more history than just the consecutive batters retired record.

"I told somebody in the fourth or fifth inning, 'He's not getting a perfect game today,'" Span said. "Not today, not in the Dome."

And after Buehrle retired Nick Punto on a groundout for the second out of the sixth inning and his 45th straight batter retired, the Twins ensured that perfection wasn't a possibility. Battling back from an 0-2 count, Alexi Casilla drew a walk off Buehrle on a 3-2 changeup.

Span followed Casilla's walk with the first hit of the game off Buehrle -- a single to center -- and Joe Mauer tied the game at 1 with his ground-rule double to left that was misjudged by White Sox left fielder Scott Podsednik.

"For the first time all game, I think he was uncomfortable a little bit," Span said of Buehrle following the walk. "He had been in the windup the whole game. He was just on a roll and in a groove."

Once that groove disappeared, things started to unravel quickly for Buehrle.

The ace hit Cuddyer with a pitch to start the seventh and gave up back-to-back singles that scored one run, giving Minnesota a 2-1 lead. Following a sacrifice bunt by Carlos Gomez to move the runners to second and third, Punto singled to right field to drive in two more runs and White Sox manager Ozzie Guillen came to take Buehrle out of the game.

As Buehrle walked off the mound toward the dugout, the crowd rose with an ovation that likely was in part a reflection of the left-hander's accomplishment and also a celebration that the Twins had knocked him out of the game.

"It was cool, obviously to retire that many in a row and set the record," White Sox catcher A.J. Pierzynski said of Buehrle's feat. "But it was bittersweet that it was Bobby's record and we lost the game. Mark pitched better than his line showed. It wasn't meant to be tonight but it was amazing what he did."

While he had to pitch in the shadow of what Buehrle was doing early, Twins starter Scott Baker delivered a solid outing himself. He allowed just one run on four hits over six innings, with his lone run coming on Jermaine Dye's 23rd home run of the season -- a two-out solo shot in the sixth.

"The main thing that happens is [Buehrle's] getting guys out pretty effectively and very quickly so you don't get a lot of down time between innings," Baker said. "You really have to compose yourself and not let the game get going too fast and try to make pitches. ... I felt like I did a pretty good job of maintaining myself and maintaining my composure regardless of what was going on over on the other side."

Things got a little interesting for Minnesota at the end when Bobby Keppel gave up two runs in the ninth before Joe Nathan was called upon for the one-out save with the tying run at the plate. Nathan got DeWayne Wise to fly out to right field to capture his 28th save of the season.

It ended up a victory for Minnesota, but on a night when history looked possible -- even if it ended up with a poor finishing line by Buehrle -- the Twins couldn't help but be impressed by what they witnessed from the pitcher.

"I give him a lot of credit," Span said. "He definitely earned a lot of points in my book the way he came out and showed a lot of courage and just a lot of heart."