Updated

Brandon Inge singled in the go-ahead run as the Pittsburgh Pirates scored four times in the eighth inning to rally for a 6-4 victory over the Milwaukee Brewers at Miller Park.

Starling Marte began Pittsburgh's comeback with a two-run homer off John Axford in the eighth that knotted the score, with Pedro Alvarez contributing an RBI single later on to help the Pirates avoid a sweep of the three-game set and end a string of nine consecutive losses to Milwaukee.

"It's a start," said Pirates manager Clint Hurdle. "We thought we were going to do it last night," referring to a 12-8 loss to the Brewers on Tuesday.

Alvarez had a solo homer earlier in the game and Michael McKenry also went deep for Pittsburgh, while four Pirate relievers combined for five innings of one-run ball to aid in the win. Bryan Morris (1-1) received the decision after recording the final two outs of the seventh.

"Everyone that took the mound for us today gave us what we needed," Hurdle remarked.

Axford (0-3) was tagged for four runs -- three earned -- and four hits while getting just two outs after taking over for Brewers starter Hiram Burgos, who held Pittsburgh to two runs and four hits over seven sharp innings.

Carlos Gomez and Yuniesky Betancourt had back-to-back solo homers in the fourth for a Milwaukee squad that had been aiming for a ninth consecutive home win.

Axford came on in the top of the eighth to protect a 4-2 lead and was greeted by an infield single from pinch-hitter Travis Snider. Marte then belted a fastball well over the wall in center to tie the score.

"The first batter I thought [Axford] made good pitches to," said Brewers manager Ron Roenicke. "He broke a hitter's bat and he placed it perfectly between third and short. Then he got a ball down in the zone, a fastball to Marte, and obviously he hit it well."

Jose Tabata followed Marte's homer with a single and stole second to move into position for Inge's bloop base hit to right, which enabled pinch-runner James McDonald to cross the plate with the eventual game-winner. Inge took second on the play when Milwaukee's Rickie Weeks inadvertently kicked the ball down the line, then came home when Alvarez singled off reliever Michael Gonzalez.

Mark Melancon and Jason Grilli shut the door over Milwaukee's final two at- bats, with the latter working a scoreless ninth for his MLB-best 11th save of the season.

The Brewers had gone ahead on Gomez's homer, a leadoff laser against Bucs starter Jeanmar Gomez that landed off the batter's eye in straightaway center field to break a 1-1 deadlock in the bottom of the fourth, and Betancourt golfed the very next pitch into the bullpen in left for his third long ball in as many games.

Burgos kept the Pirates at bay until McKenry ended a sequence of eight straight batters set down by the rookie with his third homer of the season, which pulled Pittsburgh within a run in the seventh.

The Brewers went back up by two in their half of the frame, when pinch-hitter Khris Davis reached by being hit by Pittsburgh's Justin Wilson and later scored on a Jean Segura single.

Milwaukee grabbed a 1-0 lead after one inning with the help of an error by Pittsburgh shortstop John McDonald, who threw wildly to first to allow Segura to reach base. Segura then stole second before crossing the plate when Ryan Braun singled up the middle.

Jeanmar Gomez prevented any further damage by retiring both Carlos Gomez and Betancourt with the bases loaded later in the frame, and Alvarez pulled Pittsburgh even by launching a Burgos offering into the second deck in right in the second.

Game Notes

The win was the first in the majors for Morris, who was making his eighth career appearance ... Tabata was removed for James McDonald after sustaining an apparent leg injury in the eighth ... Inge finished 2-for-4 and has hit safely in eight games since joining the Pirates on April 23 ... Carlos Gomez also went 2-for-4 and is batting .517 (15-for-29) during an eight-game hitting streak of his own ... Betancourt's homer was his seventh in 15 games since April 16 and matched his entire HR total of last season, which came in 215 at- bats with Kansas City ... Pittsburgh, which completed a 10-game road trip at 6-4, has won the final game of each of its last six series.