NEW YORK -- Shortstop Starlin Castro homered on the first pitch of the ninth inning Sunday afternoon to snap a tie and lift the Chicago Cubs to a 2-1 win over the New York Mets at Citi Field.

Castro's homer off Mets right-hander Jenrry Mejia landed just beyond the right field fence.

Castro and right fielder Ryan Sweeney each had two hits while third baseman Luis Valbuena had an RBI single in the fourth for the Cubs, who snapped a three-game losing streak.

Right-hander Pedro Strop earned the win despite squandering the Cubs' 1-0 lead in the eighth, when he gave up two hits, including an RBI single by Mets right fielder Curtis Granderson.

Right-hander Hector Rondon notched his 17th save with a perfect ninth.

Marlins 10, Diamondbacks 3

MIAMI -- Backed by Giancarlo Stanton's three-run homer and four RBIs, Miami reached the .500 mark after beating Arizona.

Stanton, the right fielder, leads the National League with 32 home runs and 88 RBIs. His RBI total represents a career high.

Another Marlins hitting star was left fielder Christian Yelich, who had two doubles, a single and a steal.

The win went to right-hander Tom Koehler, who got past a rough start to allow just two runs in six innings. Right-hander Josh Collmenter took the loss, allowing five runs -- including two homers -- in four innings.

Orioles 4, Indians 1

CLEVELAND -- Steve Pearce and Jonathan Schoop homered and Kevin Gausman combined with three relievers on a two-hitter for Baltimore.

The Orioles, who have not lost three games in a row since a four-game losing streak that ended on May 30, were held to one run in losing the first two games of the series, but they rallied to win the last game.

The win went to right-hander Gausman, who pitched six innings and held the Indians to one run on two hits. Left-hander Zach Britton pitched the ninth to pick up his 26th save.

Mariners 8, Tigers 1

DETROIT -- Chris Young tossed six scoreless innings and Kyle Seager drove in three runs as Seattle cruised to a victory.

Young allowed four hits and struck out four while winning his fourth consecutive decision. Second baseman Robinson Cano scored three runs and right fielder Chris Denorfia added three hits and an RBI for the Mariners, who took two of three games in the series.

Seattle manager Lloyd McClendon was ejected for the second straight game. Third base umpire Tony Randazzo, who also tossed McClendon on Saturday, ejected him in the seventh after the Mariners lost an appeal on a check swing.