Updated

The slumping Texas Rangers need a day off.

And they're getting one after losing their fourth consecutive series, getting swept after the Pittsburgh Pirates won 7-5 Wednesday in the finale of a three-game interleague matchup of wild-card leaders.

"We'll be fine," second baseman Ian Kinsler said. "We've got an off day and then come back ready to play. It's all we can do."

The Rangers (81-64) have lost nine of its last 12 games. That has taken them from a three-game lead in the AL West to 2 ½ behind Oakland before the Athletics played at Minnesota on Wednesday night.

Texas has its last scheduled day off of the regular season Thursday while Oakland wraps up its series against the Twins.

After that, the Rangers have games on 17 consecutive days. That stretch starts Friday at home with the opener of a three-game set against the A's, the last series of the regular season between the AL West's top two teams.

"Good time for an off day when we're playing like this," said closer Joe Nathan, who never even got a chance to pitch against the Pirates. "Get away from the game, hopefully turn something around. Just like when you're playing well, you don't want off days, in this situation, we needed the off day."

Clint Barmes homered and drew a bases-loaded walk for the Pirates (84-61).

Pittsburgh ensured its first winning season since 1992 with a victory in the opener against the Rangers, and has now won nine consecutive interleague road games. The Pirates finished 15-5 overall during the regular season against AL teams.

"That's a big-time record," manager Clint Hurdle said. "They're challenging because they're like pop quizzes. You got to watch video and maybe you've seen them. I had a little history here with a few of the hitters. It's just been the way we've been able to show up."

After being swept in three games at St. Louis last weekend, the Pirates moved within a half-game of the NL Central-leading Cardinals, which hosted Milwaukee on Wednesday night.

A.J. Burnett (8-10) struck out seven in 6 1-3 innings, though he faded late after retiring the first 13 batters he faced.

Kyle Farnsworth, the fourth Pittsburgh reliever, worked the ninth for his first save since 2011.

Matt Garza (3-4 with Texas, 9-5 overall) needed 89 pitches to get through four innings and left down 3-0. He struck out six, but also walked four and gave up five hits.

Garza, acquired July 22 from the Chicago Cubs to bolster the Rangers' rotation, is 0-2 his last four starts.

"I feel fine, just didn't have location and paid for it," Garza said. "You've got to let them go. You can't dwell on them."

Felix Pie had a leadoff walk in the third, stole second and scored on Neil Walker's single. The Pirates loaded the bases in the fourth before Barmes drew a walk, and another run came home on a fielder's choice after shortstop Elvis Andrus bobbled a likely double-play grounder.

Barmes' solo homer in the eighth that made it 7-5 was the only home run hit by either team in the series.

With his breaking ball working, Burnett struck out five the first two innings and didn't allow a base runner until A.J. Pierzynski's one-out double in the fifth.

"That's about the only time it was effective. I started to lose it toward the end," Burnett said. "My arm started dragging a little bit. But I just wanted to come out and set the tone and keep it going."

That first hit by Pierzynski might have been caught if Gold Glove center fielder Andrew McCutchen wasn't getting a day off. The ball went over the outstretched glove of Pie.

Burnett gave up five hits and walked two over the last 10 batters he faced. After the bottom two batters in the Rangers lineup walked to start the sixth, they scored when Andrus got a single that ricocheted off shortstop Barmes' glove into short left as he tried to make a backhanded stop.

Notes: Texas was 10-10 in interleague play. ... Suspended Rangers slugger Nelson Cruz started workouts Wednesday at the team's spring training complex in Arizona with full defensive drills and batting practice. Instructional league games begin next Wednesday. Cruz's 50-game suspension came after Major League Baseball's investigation into the Biogenesis clinic in Florida accused of distributing banned performance-enhancing drugs. Cruz's suspension goes through the end of the regular season, meaning he could be eligible for the postseason.