ARLINGTON -- Having gone three weeks without recording back-to-back wins, the Twins were desperate for any sign that perhaps things were going to get back on track.

And after rallying from a five-run deficit to capture a victory over the Rangers on Tuesday night, the Twins held hope that perhaps it was the spark that they really needed.

"You never know when one game can lift you to 10 games in a row," Twins manager Ron Gardenhire said before Wednesday night's contest.

The Twins had been battling back in contests prior to Tuesday, but finally they had managed to stage one big enough for a victory. So the message to the starting staff seemed to be this: Keep the game within reach and the offense will find a way to provide enough run support to pull out wins.

That's exactly what happened on Wednesday night. Although Scott Baker gave up four runs to put the Twins in a four-run hole by the end of the fourth inning, he kept the damage minimal enough where the bats could overcome it. And a four-run sixth inning by the Twins lifted the club to a 5-4 victory over the Rangers.

It marked the first back-to-back wins for Minnesota since July 28-29, when the Twins completed a three-game sweep of Chicago, and Wednesday's win brought them within 5 1/2 games of the first-place Tigers, who lost to Seattle.

"We're in a tough predicament ourselves," Gardenhire said. "We've been battling and having a tough time and getting behind way too many times. But it just says a little bit about our team. There is no die or no give up."

Baker (11-7) got through the first two frames unscathed, throwing a total of 27 pitches while allowing just one hit. Then came trouble for Baker in the third and fourth innings.

The right-hander gave up three runs in the third inning, allowing the first four batters he faced to reach base before recording a single out. Baker then gave up one run in the fourth, as each of the first three batters reached base, prompting Jeff Manship to warm up in the bullpen.

But Baker found a way to limit the trouble, getting through those problem innings with just the four runs scoring.

"I continued to make pitches and tried to stay positive," Baker said. "For the most part, it worked out."

And as their starter settled down, the Twins offense once again found a way to claw back against Rangers starter Kevin Millwood, who has had trouble finding success against Minnesota.

In 10 career starts against the Twins, Millwood was 0-6 with a 6.00 ERA. That number dropped to 0-7 on Wednesday, as Millwood gave up five runs on seven hits over his 5 2/3 innings.

Having wasted a bases-loaded opportunity with one out in the third, the Twins faced the same scenario in the top of the fifth against Millwood. Orlando Cabrera, who had struck out looking for the second out of that third inning, came through the second time with a sacrifice fly to center to score Minnesota's first run in the fifth -- making it a 4-1 Rangers lead.

"Especially after yesterday's come-from-behind win, today it just felt like we were going to put together a little rally, and we did," Denard Span said.

Cabrera added his second RBI of the night as part of a four-run sixth inning for the Twins. Back-to-back doubles by Michael Cuddyer and Joe Crede started the inning. Nick Punto, Span and Cabrera then followed with three straight two-out hits to drive in three more runs and give Minnesota a 5-4 lead.

"I couldn't make pitches there in the sixth," Millwood said. "I felt fine and my stuff felt fine, but I didn't put the ball where I needed to. I can't let guys get on base. I've got to make them earn their way on."

After the Twins took a lead, the club planned to go to the bullpen since Baker had thrown 97 pitches through five innings and was in line for the win. But the right-hander made it clear that he wanted to go back out and help the 'pen.

Although Baker put two runners on with one out, left-hander Jose Mijares came into the game and got the Twins out of the jam by inducing a double play.

It was the start of Mijares' best outing -- and perhaps most critical one -- of the season. With the Twins wanting to stay away from Matt Guerrier and Jesse Crain, who had pitched a couple days in a row, Mijares threw a career-high 2 2/3 scoreless innings -- retiring all seven batters he faced -- and held that one-run lead until the ninth for closer Joe Nathan.

Boosted by the birth of his son two days earlier, Mijares delivered a performance that Gardenhire said was "as good as we've seen him throw the ball."

"I'm feeling good," said Mijares, who has a 2.15 ERA in 48 appearances this season. "When I go to the mound, I'm focused on every hitter, every pitch."

Nathan picked up his second save in as many nights, giving him 31 on the season, as the Twins found a way to ensure at least a series split with the Rangers after having lost each of their previous five series. And in the process, they also found a way to make up ground -- albeit slightly -- in the American League Central hunt.

"Wins like this are very important for our team because we are in a race here," Gardenhire said. "We gained a game on Detroit, so that's a good thing for us. We're under .500 and have to really battle and that's what these guys have been doing the last two nights."