PITTSBURGH (AP) -- Kyle Lohse pitched effectively into the seventh inning, Carlos Gomez homered and the Milwaukee Brewers beat the Pittsburgh Pirates 5-3 Friday night.

Lohse (3-1) improved to 11-2 in his career against the Pirates, allowing one earned run in a win against them for the second time in six days.

He fell one out shy of a complete game Sunday at Miller Park. This time, he was charged with three runs - two unearned - and four hits with three walks with five strikeouts.

Gomez homered deep to center to lead off the fifth and added an RBI single an inning later as the Brewers rallied from an early two-run deficit.

Charlie Morton (0-2) allowed five runs and eight hits in six innings while losing to Lohse for the second time this week. Russell Martin had two hits and two RBIs for the Pirates, who have lost six of eight.

Four Milwaukee relievers combined to allow five baserunners in 2 2-3 innings but did not allow any runs while stranding six. Francisco Rodriguez worked the ninth for his fifth save in five opportunities this season. His last three saves have come against the Pirates.

After not getting a runner past first base in their first three innings against Morton, the Brewers loaded the bases with no outs in the fourth. Scooter Gennett's double to right scored Ryan Braun and Aramis Ramirez. Khris Davis was thrown out at home on the play, but Martin Maldonado followed with a single to drive in Gennett and give Milwaukee a lead it didn't relinquish.

A day after scoring nine runs in the seventh and eighth innings, the Pirates pulled to 5-3 in the seventh on Andrew McCutchen's RBI double, but Will Smith came on and struck out cleanup hitter Pedro Alvarez with runners on second and third to end the inning.

The Pirates loaded the bases in the eighth, but Jim Henderson got Starling Marte to pop out to end the threat.

The game featured one of the more peculiar plays of the season when Maldonado literally hit the cover off the ball in the sixth inning.

Maldonado grounded to third, where Alvarez fielded a ball that's cover had partially ripped off. Alvarez threw the flapping, awkwardly floating ball toward first, but it fell well short of the bag, giving Maldonado an infield single.

NOTES: Pittsburgh SS Jordy Mercer was removed from the game with what the team called "discomfort" in his right ankle after Maldonado collided with him at second base during the third inning. Mercer stayed in the game the remainder of the inning. ... Less than 15 minutes before first pitch, the Pirates announced they acquired 1B Ike Davis from the New York Mets in exchange for minor-league RHP Zack Thornton and a player to be named. ... The Pirates went homerless after hitting four in an 11-2 win in the series opener Thursday. They entered Friday with 19 homers over their previous nine games. ... Playing each other seven times in a 10-day span, the Pirates and Brewers play the eighth of those meetings Saturday when Pittsburgh LHP Wandy Rodriguez (0-2, 7.31) faces Milwaukee RHP Matt Garza (0-2, 3.43).