PITTSBURGH — Gregory Polanco homered, Chris Stewart added three hits and the Pittsburgh Pirates completed a four-game sweep of the NL Central-leading Milwaukee Brewers with a 4-2 victory Thursday.

The Pirates have won 11 of 13 and moved within three games of the Brewers. Milwaukee has lost five straight.

Polanco hit a solo shot off Jimmy Nelson (8-5) in the fourth inning, his ninth homer. Stewart scored the go-ahead run in the fifth on a single by Josh Harrison.

Jameson Taillon (6-3) struck out a season-high eight in 51/3 innings. Felipe Rivero worked a perfect ninth for his ninth save.

It was 2-2 in the fifth when Stewart led off with a single and Taillon sacrificed. Harrison and Andrew McCutchen had RBI singles with two outs.

METS 3, CARDINALS 2: Cardinals pitcher Trevor Rosenthal was late covering first base on a two-out grounder by Jose Reyes that turned into a winning single in the ninth inning, lifting New York at home.

A leadoff walk and T.J. Rivera’s single put runners on the corners with two outs. Reyes then hit a grounder up the first-base line, and Matt Carpenter fielded it cleanly well behind the bag. Rosenthal (2-4) was slow to leave the mound, and the speedy Reyes easily beat him to the base with a headfirst dive.

Carpenter never even made a throw. Rosenthal hurdled Reyes as they crossed paths.

Reyes’ fourth career walkoff RBI gave the Mets a split of the four-game series.

DIAMONDBACKS 12, REDS 2: Jake Lamb hit a pair of three-run homers and Patrick Corbin pitched into the eighth inning, leading Arizona at Cincinnati.

Arizona stabilized itself by taking 2 of 3 in the series. The Diamondbacks had dropped 8 of 9 heading into the set, falling behind Colorado for the second NL wild-card spot.

Lamb homered in the first inning off Luis Castillo (1-3) and again in the ninth for a career-high six RBI.

Gregor Blanco and Ketel Marte added two-run shots for the Diamondbacks.

Scheduled starter Taijuan Walker was scratched after his wife, Heather, went into labor Thursday morning.

AMERICAN LEAGUE

ORIOLES 9, RANGERS 7: Jonathan Schoop and Adam Jones both homered and drove in three runs, and Baltimore rallied at home to complete a four-game sweep.

Mark Trumbo and Chris Davis also went deep for the Orioles, who trailed 5-1 in the fifth inning before coming back to hand Cole Hamels (4-1) his first loss in 10 starts this season.

Baltimore hit 10 home runs in the series and outscored Texas 34-11.