Jacob deGrom pitched seven sharp innings and Pete Alonso put the New York Mets ahead with a two-run single in a 4-1 victory over the Kansas City Royals on Saturday night.

Alonso got three hits and snapped a 1-all tie with two outs in the seventh when he rolled a bases-loaded grounder up the middle. Juan Lagares, who also had three hits, added an RBI triple in the eighth.

The bottom three batters in New York’s lineup went 5 for 11 and combined to score all four runs.

Last year’s NL Cy Young Award winner, deGrom (8-7) gave up one run and three hits while striking out five. Since the All-Star break, he has permitted just five earned runs in 45 innings for a 1.00 ERA.

Royals starter Jakob Junis (8-11) allowed a one-out single to Lagares in the seventh and hit No. 9 batter Aaron Altherr with a pitch. Kansas City manager Ned Yost brought in Jake Newberry, who walked Amed Rosario to load the bases.

Yost again went to his bullpen, this time to submarine left-hander Tim Hill. He struck out pinch-hitter J.D. Davis on three pitches, but couldn’t finish off Alonso. The rookie slugger narrowly missed a grand slam down the right field line when a crew chief review determined the ball sliced just foul, upholding the initial call on the field.

With the runners going on a full-count pitch, Alonso then fisted a grounder up the middle to drive in Lagares and Altherr for a 3-1 lead. Second baseman Whit Merrifield made a sliding stop in shallow center and fired home to try to get Altherr, but Hill cut off the throw.

In the bottom half, deGrom got out of trouble with the help of a double-play ball. Lagares’ triple in the eighth drove in Luis Guillorme.

Justin Wilson threw a scoreless inning and Seth Lugo worked a perfect ninth for his third save.

Junis dealt with traffic on the basepaths all night, but managed to work around seven hits, all singles, a walk and two hit batters to allow just three runs in 6 1/3 innings. His defense turned two double plays behind him to help him out of jams in the second and fifth, but the Royals’ bullpen couldn’t finish off the seventh inning for him.

Hunter Dozier had two of Kansas City’s three hits, his second straight multihit game.