CHICAGO - Pittsburgh Pirates manager Clint Hurdle figured snapping a season-high seven-game losing streak would be no easy task.
Joel Hanrahan made it about as dramatic as it can get.
Hanrahan allowed two runs in the ninth, then struck out Dave Sappelt with the bases loaded to preserve a 7-6 win over the Chicago Cubs on Saturday.
Andrew McCutchen homered and reached base four times for Pittsburgh, which had dropped 11 of 13 overall.
"If it was about everybody's comfort, you'd choose to do it differently," Hurdle said. "But usually when you push through something like we're going through right now, it's gonna take some drama, and it's gonna take some wherewithal, and some confidence and some grit.
"It was enough today to get us out of the direction we were headed in and headed in a new direction."
Wandy Rodriguez (11-13) held Chicago to three runs - one earned - in helping the Pirates stop their free-fall in the NL playoff race. Pittsburgh had lost 17 of 22, yet was just three games behind St. Louis for the second NL wild-card slot entering the day.
Rodriguez improved to 3-0 with a 1.40 ERA over his last four starts after struggling initially upon being acquired midseason from Houston.
McCutchen launched Jason Berken's pitch off the rear fence behind the left-field bleachers leading off the third, his 28th homer of the season. He also singled and walked twice, improving to .394 in 27 career games at Wrigley Field.
Hanrahan allowed Alfonso Soriano's RBI single in the ninth and walked in a run, but held on for his 35th save.
"It's obviously not how we write it up, especially with a seven-game losing streak, you want to go out there and have it go smooth," Hanrahan said. "Being here in Chicago, dinner isn't good until about 6 o'clock anyway, so keep us around a little bit."
Starling Marte had an RBI triple, doubled and scored twice as Pittsburgh scored more than four runs for the first time since its losing streak began. The Pirates were aided by a pair of Cubs errors that led to four unearned runs.
Clint Barmes hit a solo homer in the seventh, and enjoyed the return of his double-play combination, Neil Walker, who started for the first time since Aug. 26 due to lower back tightness.
Walker went hitless in five at-bats, but his presence was felt elsewhere.
"Just looking over and seeing (Walker) out there, it brought a whole different feel to the clubhouse," Barmes said. "We need him out there. Having him out there puts everybody a little more at ease."
Berken (0-1) struggled in his Cubs debut, giving up eight hits in four innings, though just two of the six runs he allowed were earned.
Berken, who was claimed off waivers on Sept. 7 after Baltimore designated him for assignment, became the 12th starting pitcher the Cubs have used this season and the team-record 53rd player they've used overall.
"He was a victim of a couple of errors," Cubs manager Dale Sveum said. "Could have gotten into the fifth only giving up two, but the errors cost him pitches and the ability to go five or six today."