MILWAUKEE -- Pedro Alvarez hit two home runs and Russell Martin added a third as the Pittsburgh Pirates routed the Milwaukee Brewers 10-2 on Saturday night at Miller Park.

The Pirates won their second in a row behind a powerful performance from the middle of their lineup. Martin and Alvarez combined with second baseman Neil Walker to go 7-for-12 with three walks, six runs and nine RBIs.

The offensive onslaught snapped what had been an impressive streak from Brewers right-hander Wily Peralta (15-8), who had won six of his last seven starts while holding opponents to eight earned runs in 45 1/3 innings.

He went just five innings Saturday and was charged with eight runs (seven earned) on seven hits and three walks while striking out five.

Peralta coasted through his first three innings, allowing only a two-out walk in the second inning. He retired the first two batters in the fourth but walked Walker and gave up a double to Martin before missing on a 1-0 fastball to Alvarez, who sent it to left for his 16th home run of the season.

Peralta put two more runners on in the inning before retiring Pirates starter Edinson Volquez to get out of it.

Milwaukee took a 2-0 lead behind a solo home run by second baseman Scooter Gennett and an RBI double by left fielder Khris Davis. Bht the Brewers stranded runners at second and third in both the second and third innings, then had the bases loaded with one out in the fourth but couldn't cash in.

The Brewers managed just two runs off Volquez, who gave up 11 hits and two walks in 5 2/3 innings but improved to 11-7 with his fifth consecutive victory and sixth in his last eight starts.

With three straight victories, Pittsburgh moved to four games behind the Brewers, who began the day with a 1 1/2-game lead over second-place St. Louis in the National League Central.

Milwaukee has lost three in a row.

NOTES: Brewers SS Jean Segura got the day off Saturday, a "mental break," manager Ron Roenicke called it after Segura committed two errors and went 0-for-3 at the plate on Friday. In his last eight games, Segura is batting .136 (3-for-22). ... Pirates relievers began the day with 28 victories, tied with Cleveland for the most this season. ... Milwaukee has held at least a share of first place for the NL Central every day since April 5, a span of 140 days. ... Pittsburgh INF Clint Barmes continued his minor league rehab assignment Saturday with Triple-A Indianapolis. He's expected to play all nine innings Saturday and Sunday,and could be back with the Pirates Monday against the Cardinals in Pittsburgh.