Updated

Andrew McCutchen homered and reached base four times, and the Pittsburgh Pirates held off a late rally to snap a seven-game losing streak with a 7-6 win over the Chicago Cubs on Saturday.

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 is 3-0 with a 1.40 ERA over his last four starts after struggling initially upon being acquired midseason from Houston.

McCutchen launched Jason Berkin's pitch off the rear fence behind the left-field bleachers leading off the third, his 28th round-tripper of the season. He also singled and walked twice, improving to .394 in 27 career games at Wrigley Field.

Joel Hanrahan allowed Alfonso Soriano's RBI single in the ninth and walked in a run, but held on for his 35th save. He struck out Dave Sappelt with the bases loaded to end it.

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.

Berkin (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.

Berkin, 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.

Anthony Rizzo had two hits and an RBI for Chicago, and Soriano drove in two runs, leaving him one RBI shy of his first 100 RBI season since 2005.

Starlin Castro had two hits and reached base three times, but missed a chance to move into a tie for the NL lead in triples when he tripped over second base on a double up the right field line in the eighth.

Josh Vitters' throwing error on a routine ball led to three unearned runs in the fourth, all scoring with two outs. Marte pounded an RBI triple to center, while Travis Snider and Garrett Jones drove in runs to cap the rally.

NOTES: Cuban OF Jorge Soler made his first visit to a big league ballpark Saturday when he participated in pregame drills with the Cubs at Wrigley Field. The powerfully-built 20 year old put on an impressive display in batting practice, knocking two balls onto Waveland Avenue and three more that easily cleared the ivy in left. The Cubs won a hotly-contested bidding war for Soler, signing him to a nine-year, $30 million contract in June. . Pirates manager Clint Hurdle declined to answer a pregame question about whether removing James McDonald from the starting rotation was an option. "We're doing some internal talking in a lot of different areas. I had a talk with James yesterday. We'll just leave it at that right now," Hurdle said. McDonald lasted only 3 2-3 innings Friday and is 3-5 with a 7.08 ERA in the second half. . OF Alex Presley (right foot) was unavailable Saturday after being hit by a pitch in the ninth inning Friday. . Neil Walker started at second base for the Pirates for the first time since Aug. 26. He pinch hit in Friday's game, his first action after missing 15 games with a back injury.