MIAMI — A break and a bomb from the big kid made the difference for the Mets on Monday night.

Pete Alonso hit a three-run home run to right-center field in the four-run ninth inning as the Mets beat the Marlins, 7-3 at spacious Marlins Park.

Alonso hit it 444 feet, his first major league home run, capping an excellent first week in the majors for the rookie. Alonso came into the game on fire with a .500 average and 1.321 OPS.

The Mets went to the top of the ninth tied 3-3. Alonso was 0-for-4 with three Ks before that home run off right-hander Drew Steckenrider, once again saving the Mets this first week of the season, batting second in place of the injured Jed Lowrie, giving Mickey Callaway a lift to his left-right balanced batting order.

It was a strange night all around, starting with J.D. Davis at third base, who soft-tossed what should have been a double-play ball to second in the sixth, allowing Roswell Herrera to reach first and keep the inning alive. The Marlins scored in that inning against Steven Matz to take a 3-2 lead. Davis also could not field a throw from center field.

The Mets tied it in the seventh on Juan Lagares’ solo home run to the opposite field.

Dom Smith led off with a pinch-hit single in the ninth, beating the shift by slapping the ball past the shortstop. That brought Lagares to the plate, and as he was trying to bunt with two strikes he sent the ball foul as it hit his right pointer finger and was awarded first base on what appeared to be a strikeout.

The call stood upon review, giving the Mets what appeared to be a huge break.

That brought the struggling Brandon Nimmo to the plate and he struck out, his ninth strikeout in 13 at-bats. He looked lost at the plate as he swung over the curve ball from Steckenrider. Rosario came through with an RBI single to give the Mets the lead.

Then came Alonso’s three-run bomb.

Smith, their other first baseman, started the rally and then went to first in the bottom of the ninth. The Mets have been getting a lot from both their young first basemen, and this time sparked the game-winning rally.

With so many good players on the roster, Callaway has some lineup options, which showed in the opening series against the Nationals.

The Mets won two of three and in the final two games produced 27 hits and 16 runs. With that kind of production it was a surprise the Mets did not sweep the series.

The Mets went into the night hitting .400 with runners in scoring position, no team had a higher batting average with RISP, as the change in personnel and situational hitting approach has made a difference.

Jeff McNeil was back in the lineup after getting benched against lefty Patrick Corbin even though McNeil had four hits on Saturday. Evidently, he matched up better against the lefty Caleb Smith and then in the second inning hit a two-out double to drive in the Mets’ first run Monday night.

Mystery man Yoenis Cespedes visited the team and was set to take some swings in the indoor cage but is still a long way away from playing.

Callaway has not yet hit the pitcher eighth. He said he did that last year because of where Amed Rosario was in his development. Davis was batting fourth Monday night, pushing Michael Conforto to the fifth spot.

Callaway put the Mets on notice before the game saying, “We have to come out this series and play like they are the Nationals. You can’t let up. Every game is Game 7 to us.’’

“Most of the discussions we have had so far about the lineup,’’ bench coach Jim Riggleman told me, “have been, ‘do we bunch our left-hand hitters together?’ ’’

Alonso allowed them to split up the lefties and has come up with huge hits when needed most.