With the majors' lowest scoring offense, the San Diego Padres know they have little margin for error.

So, when a ball glanced off Chase Headley's glove in the bottom of the ninth inning, San Diego's chance at avoiding a sweep was gone.

Drew Butera's single kicked off Headley's glove and into left field, allowing Delmon Young to score as the Minnesota Twins rallied to beat the Padres 5-4 on Sunday.

Headley finished with two hits and an RBI in San Diego's fifth-straight loss, but he also made a key error in the seventh, allowing the Twins to come from behind for their seventh-straight win.

"We don't have the luxury of making mistakes," Headley said. "We're not playing well enough where we can overcome a mistake. That kind of magnifies everything. It magnifies your at-bats when you're up there, every defensive play. It magnifies every pitch. And that's not an easy way to play the game."

Young led off the ninth with an infield single and advanced to second on Luke Hughes' sacrifice bunt.

Butera's grounder bounced off the glove of a diving Headley and past shortstop Jason Bartlett, who had ranged behind Headley.

"One of those balls that's kind of in between a dive and being able to just stand up," Headley said. "That's what I do on that ball every time, and that's what I'd do next time. Unfortunately, it tipped off my glove. Bart's going into the hole and it kicks by him. It's just a tough way for it to end."

Alex Burnett (2-4) pitched one inning for the win. Chad Qualls (3-3) took the loss.

After the Twins scored three unearned runs to take a 4-3 lead in the seventh, the Padres tied it on Will Venable's infield single in the eighth. Reliever Glen Perkins was late getting off the mound to cover first on Venable's grounder to the right side.

Pinch-hitter Rene Tosoni tied the game in the seventh on a double down the first-base line. Matt Tolbert briefly gave the Twins the lead with a double to left-center.

"It just goes to show when you're on a little bit of momentum like they are, good things happen," San Diego manager Bud Black said. "They're catching breaks, balls just eluding infielders. Those are the types of things that need to happen when you're winning."

The rally was made possible by Headley's throwing error that put runners on second and third with one out.

"I feel like we open the door just a crack, just a crack, and teams are jumping right in there," Padres catcher Rob Johnson said. "Right now I feel like we've got to play perfect baseball. But tip your hat, they took advantage of the opportunities they had."

The Padres have lost eight of nine and squandered another strong start from Dustin Moseley. Moseley has received the third-lowest run support in the majors this season, but exited leading 3-1 in the seventh. He allowed three runs — one earned — in 6 1-3 innings.

The Padres activated Orlando Hudson from the disabled before the game, and the former Twin had two hits and scored a run.

Twins starter Francisco Liriano did not surrender a hit until there was one out in the fourth inning. He struck out eight over seven innings.

The Padres strung together three infield hits in the fifth inning to score twice and take a 3-1 lead.

San Diego failed to make solid contact much of the afternoon, but at this point, the Padres will take runs however they can get them. They came in hitting .220 and scoring just 76 runs over their last 29 games.

Notes: The Padres optioned Logan Forsythe to Triple-A Tucson to make room for Hudson. Forsythe was hitting .167. ... Twins 1b Justin Morneau will have a cast removed from his left wrist on Friday or Saturday. He will need a couple of more days to regain his range of motion before being re-evaluated. ... Twins manager Ron Gardenhire said there was a "good chance" injured closer Joe Nathan could rejoin the team on Friday. ... The banged-up Twins played without 3b Danny Valencia, who homered in consecutive games but sat out the series finale with an arm strain.