Gabriel Ynoa came within an out of a win by pitching 4 2/3 effective innings, T.J. Rivera homered and New York completed a three-game sweep of Minnesota.

Ynoa allowed one run and four hits while throwing 76 pitches. He struck out eight, equaling a season-high set June 23 at Reno for Triple-A Las Vegas. Ynoa was pressed into the role when originally scheduled starter Jacob deGrom was lost for the season due to an elbow injury Saturday.

After Saturday's 12-inning win, the Mets rested regulars Jose Reyes, Asdrubal Cabrera, James Loney and Curtis Granderson.

Red Sox 5, Yankees 4

BOSTON -- Hanley Ramirez slugged two home runs, including the go-ahead solo shot in the seventh inning, and had four RBIs to help Boston beat New York at Fenway Park.

Ramirez also launched a three-run shot two innings earlier. Ramirez has 28 homers on the year, nine in September and 20 since the All-Star break.

He also matched his career high in RBIs at 106, set in 2009 with the Florida Marlins. Ramirez was 9-for-16 with four homers and nine RBIs in the four-game series with the Yankees.

Reds 7, Pirates 4

CINCINNATI -- Joey Votto had four hits including a home run and Tucker Barnhart tied a career high with four RBIs to help Cincinnati avoid a four-game sweep with a victory over Pittsburgh at Great American Ball Park.

The loss snapped a four-game winning streak for the Pirates, who last swept a four-game series in Cincinnati in 1991. The Pirates swept a doubleheader from the Reds on Saturday.

Pirates shortstop Sean Rodriquez hit his 17th home run of the season in the loss.

Orioles 2, Rays 1

BALTIMORE -- Mark Trumbo hit his league-leading 43rd home run in the eighth inning and Baltimore beat Tampa Bay, earning a split in the four-game series.

The Orioles won four of their past six games and hold one of the wild card spots for the playoffs entering the final two weeks of the season.

Manny Machado got his career-high 36th home run of the season for the Orioles.

Tigers 9, Indians 5

CLEVELAND -- Justin Upton and J.D. Martinez hit home runs to lead Detroit over Cleveland at Progressive Field.

Daniel Norris pitched five innings and gave up four runs (two earned) on five hits to get the win. Francisco Rodriguez pitched the last 1 1/3 innings to pick up his 43rd save.

Cleveland starter Trevor Bauer gave up six runs on 10 hits in 5 2/3 innings to take the loss. Bauer struck out five, walked two and hit three batters.

Marlins 5, Phillies 4

PHILADELPHIA -- Thanks to an eighth-inning rally, Miami beat Philadelphia at Citizens Bank Park to avoid a sweep.

Reliever Hector Neris took the loss after blowing a two-run lead for the Phillies in the bottom of the eighth. Christian Yelich hit the left-field foul pole to tie the game at four befor the Marlins got an unearned run.

Mike Dunn picked up the win and A.J. Ramos recorded his 37th save of the season.

Royals 10, White Sox 3

KANSAS CITY, Mo. -- Kendrys Morales and Alex Gordon homered as Kansas City blasted Chicago.