PITTSBURGH -- Josh Harrison hit a winning single in the 11th inning, and the Pittsburgh Pirates rallied from a five-run deficit to beat the Milwaukee Brewers 7-6 Sunday and remain 2 games behind St. Louis in the NL Central race.

With the score 6-6, pinch-hitter Travis Ishikawa singled off Tyler Thronburg (0-1) and advanced when left fielder Shane Peterson bobbled the ball for an error. Pinch-runner Pedro Florimon moved to third on Jordy Mercer's groundout, and Sean Rodriguez was hit by a pitch.

After a wild pitch advanced Rodriguez, Harrison lined a single to left. Harrison was playing because Starling Marte has stomach flu.

More from FoxSports

Pittsburgh opened a four-game margin for the NL wild-card lead over the Chicago Cubs, who start a four-game series at the Pirates on Tuesday.

Harrison, Andrew McCutche and Jung Ho Kang had two hits apiece for the Pirates, and Pedro Alvarez hit his team-leading 23rd home run. Harrison went 8 for 19 as Pittsburgh won three of four in the series.

Jared Hughes (3-1) induced Scooter Gennett to hit into an inning-ending double play in the 11th after the Brewers put runners at the corners.

Khris Davis hit a two-run home run, his 20th, for the Brewers. Rookie first baseman Jason Rogers had a career-high four hits.

Down 6-1, the Pirates scored three runs in the fourth and two in the seventh.

REST DAY

Brewers: 1B Adam Lind did not start for the fifth time in the last eight games in which Milwaukee faced a left-handed starter.

Pirates: RF Gregory Polanco got the day off after starting 16 consecutive games.

TRAINER'S ROOM

Brewers: C Jonathan Lucroy (concussion) missed his fifth straight game.

Pirates: Marte sat out for the second day in a row.

UP NEXT

Brewers: After an off day, Milwaukee hosts St. Louis on Tuesday night with rookie RHP Ariel Pena (1-0, 4.50 ERA) facing RHP Carlos Martinez (13-7, 3.12).

Pirates: Also off Monday before RHP Gerrit Cole (16-8, 2.54) and LHP J.A. Happ (9-7, 3.97) pitch Tuesday against Cubs RHP Jason Hammel (8-6, 3.59) and LHP Jon Lester (9-10, 3.50).