Updated

PITTSBURGH -- Eric Thames broke out of his slump with a home run and three hits, sending the Milwaukee Brewers to a 6-2 victory over the Pittsburgh Pirates on Sunday.

Travis Shaw and Jesus Aguilar also went deep for Milwaukee. Thames connected for a solo shot in the ninth inning off Johnny Barbato, his first homer in 10 games after hitting 11 in his first 20 games.

Thames, signed to a $16 million, three-year contract after playing in South Korea the past three seasons, had gone 4 for 27 in his last seven games. He previously played in the majors with Toronto and Seattle.

Zach Davies (3-2) won his third straight decision as the Brewers avoided being swept in the three-game series. He allowed two runs and four hits in 5 2/3 innings with seven strikeouts.

Tyler Glasnow (1-2) pitched a career-high 6 1/3 innings but took the loss. He gave up four runs, three earned, and six hits.

Fellow rookie Jose Osuna accounted for Pittsburgh's runs with his first career homer in the sixth. That chased Davies and cut the Brewers' lead to 3-2.

Thames drove in the game's first run with a third-inning double. Shaw hit his seventh homer leading off the fourth, and the Brewers scored another run in the fifth on a fielding error by second baseman Phil Gosselin to make it 3-0.

Aguilar, who entered in the sixth as part of a double switch, also homered in the ninth off Barbato. Aguilar's RBI double in the seventh pushed the Brewers' lead to 4-2.

Gregory Polanco had two hits for Pittsburgh.

TRAINER'S ROOM

Brewers: RHP Junior Guerra (strained right calf) is scheduled to throw a 60-pitch simulated game Wednesday in Milwaukee after pitching a two-inning simulated game Saturday night at Class A Wisconsin. Guerra, injured on opening day, is then expected to make two minor league rehab starts before being activated from the disabled list. . . . LF Ryan Braun (strained right forearm) did not start for the fifth straight game but remains on track to rejoin the lineup Tuesday night for the opener of a three-game series against the Red Sox.

Pirates: 3B Josh Harrison (sore foot) did not start but had a pinch-hit single in the ninth inning one day after delivering the game-winning single in the 10th.

CLEAR YOUR HEAD

Pirates center fielder Andrew McCutchen got the day off. He is 3 for 24 in his first six games in May, a skid that has dropped the 2013 NL MVP's batting average to .218.

UP NEXT

Brewers: After an off day, RHP Wily Peralta (4-2, 4.88 ERA) faces Boston LHP Drew Pomeranz (3-1, 4.00) on Tuesday night.

Pirates: Rookie RHP Trevor Williams (1-1, 5.40) makes his first start of the season and the second of his career Monday night in the opener of a three-game series against the Dodgers and LHP Alex Wood (2-0, 3.28) in Los Angeles. Williams is taking the rotation spot of RHP Jameson Taillon (groin discomfort), who was placed on the disabled list Saturday.