Jesús Sánchez hit a leadoff homer and a game-ending triple, finishing with three hits and four RBIs as the Miami Marlins came back to beat the Chicago Cubs 8-7 on Monday night.

Rookie catcher Agustín Ramírez also went deep in the first inning for the Marlins, who squandered two leads before Sánchez’s two-run triple won it with two outs in the ninth.

Miami was down to its last strike against reliever Daniel Palencia (0-1) when Derek Hill doubled on an 0-2 count and Javier Sanoja walked. Sánchez then hit a hard smash past first baseman Michael Busch and into the right-field corner, sending both runners home for the Marlins’ sixth walk-off win of the season.

After the Cubs took a 7-6 lead in the sixth, Valente Bellozo (1-2) threw three scoreless innings of relief for the win.

Miguel Amaya homered, doubled and drove in five runs for the NL Central-leading Cubs.

Recalled from Triple-A earlier in the day, Matt Shaw hit an RBI double that capped a four-run sixth against Marlins reliever Jesús Tinoco and gave Chicago a 7-6 lead. Moisés Ballesteros hit a run-scoring single and scored on Amaya’s two-run double.

Mariners 5, White Sox 1: Julio Rodríguez hit a grand slam, Luis Castillo pitched seven crisp innings and Al West-leading Seattle defeated Chicago for its fourth straight victory.

Castillo allowed three hits, struck out five and walked none in his first win since April 26. The right-hander is 2-0 with a 1.71 ERA in four career starts against Chicago.

The last-place White Sox wasted a sharp performance by Davis Martin in their fifth consecutive loss. The right-hander pitched a career-high 7 1/3 innings of four-hit ball.

Cam Booser replaced Martin (2-5) with one on in the eighth. He walked J.P. Crawford and surrendered Mitch Garver’s pinch-hit single before Rodríguez connected for his second career slam.

Reds 7, Pirates 1: Austin Hays had three hits and two RBIs, and scored the go-ahead run as visiting Cincinnati beat Pittsburgh for its fifth consecutive victory.

Gavin Lux hit two doubles, his second scoring Hays in the sixth inning to break a 1-1 tie.

TJ Friedl also had three of the Reds’ 11 hits and Elly De La Cruz had two hits and two RBIs.

Reds left-hander Nick Lodolo (4-4) allowed one run and four hits in six innings. He struck out seven and walked one.

Mitch Keller (1-6) also pitched six innings and gave up two runs — one earned — and six hits with five strikeouts and one walk. Keller has not won since his season debut on March 28 at Miami and the Pirates have lost his last seven starts.

The Pirates are 3-7 since promoting bench coach Don Kelly to manager on May 8.

Red Sox 3, Mets 1: Jarren Duran had a double and a triple as Boston tagged Mets ace Kodai Senga for three runs — the most he has given up all season — and beat New York at Fenway Park.

Senga (4-3) fell behind 3-0 after two innings before settling down and retiring the last seven batters he faced. He allowed five hits and three walks in all while striking out five.

Red Sox starter Hunter Dobbins held the Mets to one run on five hits in 4 2/3 innings.