WASHINGTON – Right in the middle of it all from the very start to the end, Bryce Harper delivered the first game-ending homer of his career, a two-run shot in the bottom of the ninth Thursday that lifted Washington to a 9-7 win over the Pittsburgh Pirates and ended the Nationals’ losing streak at six.

Harper drove a hanging slider over the wall just to the left of straightaway center with two outs off Bryan Morris (4-4), who earlier allowed a single to Kurt Suzuki.

METS 7, BRAVES 4: John Buck drove in three runs and Zack Wheeler beat Atlanta for the second time in his seventh major league start, sending New York to a win at home.

Daniel Murphy and Marlon Byrd each had three hits for the Mets, who gained a four-game series split.

CARDINALS 3, PHILLIES 1: Lance Lynn allowed one run in seven innings and St. Louis scored three times in the third to beat visiting Philadelphia.

Matt Carpenter, Jon Jay and Matt Adams drove in runs for the Cardinals.

MARLINS 5, ROCKIES 3: Rob Brantly scored on a wild pitch to break up a scoreless game in the eighth, Donovan Solano homered in a four-run ninth, and Miami overcame a 1:33 rain delay to beat Colorado at Denver.

The Rockies, who dropped 3 of 4 to the Marlins, lost slugger Carlos Gonzalez after the third inning when he aggravated a sprain of the middle finger on his right hand. He is day to day.

PADRES 10, BREWERS 8: Carlos Quentin and Jesus Guzman homered, and San Diego got 16 hits in a win at Milwaukee.

Will Venable added two doubles for San Diego and made a key catch in center field.

AMERICAN LEAGUE

YANKEES 2, RANGERS 0: Hiroki Kuroda pitched seven scoreless innings for his 10th victory, Mariano Rivera got gifts before posting another save and New York won in Texas to split a four-game series.

After David Robertson worked a 1-2-3 eighth, Rivera pitched the ninth for his 33rd save this season, extending his career record to 641.

The Yankees took the lead for good on Brent Lillibridge’s RBI double in the sixth.

ROYALS 7, ORIOLES 1: Jeremy Guthrie pitched six solid innings, Billy Butler homered and Kansas City won at home.

Guthrie (10-7), who won 47 games in five seasons with the Orioles, allowed six hits over six innings. He gave up one run, striking out five and walking one.

WHITE SOX 7, TIGERS 4: Jake Peavy pitched into the eighth inning and host Chicago beat Justin Verlander as Detroit again played minus Miguel Cabrera.

Cabrera missed his third straight game because of an injured left hip flexor.

Detroit’s Torii Hunter homered for the third time in the series but left in the eighth with a sore left Achilles.

BLUE JAYS 4, ASTROS 0: Mark Buehrle (6-7) pitched a two-hitter with a season-high nine strikeouts and Toronto won at home.