WASHINGTON -- Bryce Harper hit a two-run homer with no outs in the bottom of the 13th inning against reliever Carlos Torres to give the Washington Nationals a 5-3 victory over the New York Mets on Thursday in the finale of a three-game set.

Ian Desmond led off the inning with a walk and was on base when Harper connected for his fourth homer of the season.

The game-winning blast came just one day after manager Matt Williams told reporters there was no way Harper would be sent to the minors because of a recent slump. Harper had five hits in his last 28 at-bats before the homer.

The winning pitcher was Craig Stammen (2-4) and Torres (5-5) took the loss.

The Nationals lost their first five extra-inning games at home this year and are now 4-8 overall in such games. The Mets are 6-8.

Yankees 1, Tigers 0

NEW YORK -- Shane Greene pitched eight-plus outstanding innings to lead New York in the finale of a four-game series with Detroit.

Greene (3-1) continued an impressive run of starting pitching by the Yankees against the American League Central leaders by scattering five singles and allowing two runners past first base. He struck out five, walked three threw 64 of 99 pitches for strikes while getting 11 ground-ball outs.

Stephen Drew had an RBI ground-rule double for the Yankees, who scored 11 runs in the series and had eight singles against Detroit right-hander Rick Porcello (13-6).

The Yankees beat the Tigers in three games by getting effective starts from mid-season trade acquisitions Brandon McCarthy and Chris Capuano in victories against former Cy Young Award winners Max Scherzer and Justin Verlander. Hiroki Kuroda also matched David Price by allowing three runs in seven innings in Tuesday's 12-inning loss as New York's starters allowed a combined three earned runs in 27 innings.

Brewers 3, Giants 1

MILWAUKEE -- Wily Peralta became the first 14-game winner in the majors this season as Milwaukee beat San Francisco at Miller Park.

Peralta (14-6), a second-year right-hander, held the Giants to one run and seven hits in six-plus innings. He also set a career high with nine strikeouts and walked just one batter for his fifth consecutive victory.

Early on, it looked as if Peralta might not be on his game. He allowed the first three batters to reach in the first inning, then plunked Michael Morse with two outs before escaping the inning unscathed.

From there, he settled in quickly and held San Francisco to two hits and a walk in the next three innings.

The Giants' only run came in the fifth inning.