Charles LeClaire-USA TODAY Sports

William Contreras hit a home run Sunday to help the visiting Milwaukee Brewers defeat the Pittsburgh Pirates 6-3 in the deciding game of a three-game series.

Andruw Monasterio added an RBI double for the Brewers, who went 7-3 on a 10-game road trip. They are 5-1 against the Pirates after sweeping them in a home series June 16-18.

Milwaukee starter Colin Rea (5-4) pitched a season-high 6 2/3 innings, allowing two runs and five hits, with three strikeouts and one walk.

Devin Williams pitched the ninth for Milwaukee and earned his 17th save.

Nick Gonzales hit a two-run homer and Josh Palacios had an RBI double for the Pirates, who have lost consecutive games after a four-game winning streak.

Pittsburgh starter Rich Hill (7-8) gave up three runs and three hits in five innings, with two walks and eight strikeouts, one shy of his season best.

The teams had combined for 34 runs while splitting the first two games of the series.

In the second inning, Palacios led off with a double and Gonzales followed with his second career homer on a blast to center for a 2-0 Pirates lead.

Milwaukee came right back to take the lead in the third. Raimel Tapia was hit by a pitch with one out, Monasterio walked and Contreras smacked his ninth homer, an estimated 435 feet to left-center, to put the Brewers up 3-2.

In the eighth, the Brewers' Blake Perkins walked with two outs and went to third on Brian Anderson's single to center off Gonzales's glove at second.

Ryan Borucki relieved Carmen Mlodzinski and Brice Turang hit a chopper that Borucki fielded, but his throwing error allowed Perkins and Anderson to score and push the Brewers' lead to 5-2.

In the bottom of the eighth, Pittsburgh's Carlos Santana singled to right with two outs and scored on Palacios' double to center to cut the deficit to 5-3.

Milwaukee's Joey Wiemer led off the ninth with a single to left, went to second on Tapia's sacrifice bunt and scored on Monasterio's double to left to make it 6-3.

More must-reads:

TODAY'S BEST
Pacers ride historic shooting performance to Game 7 blowout of Knicks
Timberwolves mount incredible second-half comeback to stun Nuggets in Game 7
Xander Schauffele proves doubters wrong with historic win at 2024 PGA Championship
Four things we learned from Joey Logano's All-Star Race win at North Wilkesboro
Phil Foden lifts Manchester City to fourth consecutive English Premier League title
Watch: Aaron Judge blasts 13th home run in Yankees' seventh straight win
Canucks won't have linchpin forward for Game 7 vs. Oilers
Jags reportedly mulling extension for Trevor Lawrence, but is that the right choice?
Gordon Hayward calls role with Thunder 'frustrating'
Mets reliever Edwin Diaz showing short shelf life of closers
Three offseason moves the 49ers must make
Watch: NASCAR drivers exchange punches after crash in All-Star Race
Knicks star offers passionate defense of HC Tom Thibodeau after Game 7 loss
Knicks' Jalen Brunson suffers serious injury in Game 7 vs. Pacers
Dodgers add recently acquired left-hander to active roster
Report: 2023 No. 7 pick expected to terminate KHL contract, join Flyers
Mavericks advance to Western Conference Finals aided by controversial call late
Connor McDavid, Oilers hammer Canucks to force Game 7
Tyson Fury-Oleksandr Usyk epic increases excitement for potential rematch
Seize the Grey wins in muddy Preakness