Rookie slugger Pete Alonso hit his first major league homer, a three-run shot to cap a four-run ninth inning, and the New York Mets overcame 16 strikeouts by their hitters to rally past the Miami Marlins 7-3 Monday night.

Juan Lagares hit his first homer since Sept. 7, 2017 and sparked the ninth-inning rally when he was hit by a two-strike pitch trying to bunt.

Mets starter Steven Matz allowed three runs, one earned, in 5 1/3 innings. Three relievers blanked Miami over the final 3 2/3 innings, and Jeurys Familia (1-0) pitched a perfect eighth.

Miami Marlins' Starlin Castro, foreground, reacts after scoring a home run during the second inning of a baseball game against the New York Mets, Monday, April 1, 2019, in Miami. (AP Photo/Brynn Anderson)
Miami Marlins’ Starlin Castro, foreground, reacts after scoring a home run during the second inning of a baseball game against the New York Mets, Monday, April 1, 2019, in Miami. (AP Photo/Brynn Anderson)

The Marlins loaded the bases with none out in the ninth against closer Edwin Diaz, who struck out the next three batters.

Starlin Castro hit a two-run homer for Miami, his first, and added an RBI single.

With the score 3-all, Mets pinch hitter Dominic Smith singled to start the ninth. Drew Steckenrider (0-1) then came inside on Lagares as he squared to bunt, hitting him on the right hand. Lagares missed most of last season due to a toe injury.

New York Mets starting pitcher Steven Matz delivers during the first inning of a baseball game against the Miami Marlins, Monday, April 1, 2019, in Miami. (AP Photo/Brynn Anderson)
New York Mets starting pitcher Steven Matz delivers during the first inning of a baseball game against the Miami Marlins, Monday, April 1, 2019, in Miami. (AP Photo/Brynn Anderson)

Amed Rosario’s single put the Mets ahead, and on the next pitch Alonso homered to center field. The rookie is batting .412 with six RBIs in four games.

The Mets scored a run in the second with three consecutive hits, including an RBI double by Jeff McNeil. J.D. Davis led off the fourth with a double and scored on a two-out wild pitch.

Castro’s RBI single in the sixth put Miami ahead 3-2 and sent Matz to the exit. Lagares tied the game with his homer in the seventh.

Miami Marlins starting pitcher Caleb Smith delivers during the first inning of a baseball game against the New York Mets, Monday, April 1, 2019, in Miami. (AP Photo/Brynn Anderson)
Miami Marlins starting pitcher Caleb Smith delivers during the first inning of a baseball game against the New York Mets, Monday, April 1, 2019, in Miami. (AP Photo/Brynn Anderson)

BACK ON THE MOUND

Miami’s Caleb Smith, making his first start since June 24, allowed two runs and struck out eight in five innings. His 2018 season was cut short by a strained left lat that required surgery.

TRAINER’S ROOM

New York Mets' Pete Alonso (20) celebrates with teammates Juan Lagares (12) and Amed Rosario after hitting a three-run home run during the ninth inning of a baseball game against the Miami Marlins, Monday, April 1, 2019, in Miami. (AP Photo/Brynn Anderson)
New York Mets’ Pete Alonso (20) celebrates with teammates Juan Lagares (12) and Amed Rosario after hitting a three-run home run during the ninth inning of a baseball game against the Miami Marlins, Monday, April 1, 2019, in Miami. (AP Photo/Brynn Anderson)

Mets slugger Yoenis Cespedes, sidelined until at least mid-July following surgery on both heels, was in the clubhouse before the game and was expected to take swings in the batting cage during the series.

UP NEXT

Miami RHP Jose Urena (0-1, 9.64), who had a rough outing in an opening day loss to the Rockies, makes his second start of the season Tuesday against LHP Jason Vargas (7-9, 5.77 in 2018).

New York Mets' Pete Alonso watches his three-run home run during the ninth inning of a baseball game against the Miami Marlins, Monday, April 1, 2019, in Miami. (AP Photo/Brynn Anderson)
New York Mets’ Pete Alonso watches his three-run home run during the ninth inning of a baseball game against the Miami Marlins, Monday, April 1, 2019, in Miami. (AP Photo/Brynn Anderson)

___