The Mets (62-73) had lost seven of the previous 10 games before pulling out the victory. The Mariners (76-58), who entered Friday in a virtual tie for first place in the AL West with the Houston Astros, lost for just the third time in 16 games.
Francisco Lindor singled leading off the eighth as the first batter faced by reliever Andres Munoz (3-6). One out later, Lindor stole second and moved to third on a wild pitch before Pete Alonso struck out. Vogelbach followed by singling on a full count.
Phil Bickford (4-4) allowed one hit in the eighth inning and Drew Smith notched his third save by working around a walk and a hit in the ninth.
J.P. Crawford smacked his 14th homer of the season in the fourth for the Mariners while Julio Rodriguez had two hits.
Brandon Nimmo hit a sixth-inning homer for the Mets. Ronny Mauricio went 2-for-3 in his first big league game.
Neither starter factored into the decision following strong efforts. The Mariners' Logan Gilbert allowed one run on seven hits and no walks while striking out nine over 6 2/3 innings. The Mets' Kodai Senga gave up one run on five hits and two walks while tying a season-high with 12 strikeouts.
Senga faced the minimum while issuing one walk over the first three innings before Crawford led off the fourth with a homer to right-center field. The Mariners threatened in the sixth when Josh Rojas opened the inning with a single and Crawford drew a walk, but Senga struck out the next three batters.
Nimmo led off the bottom of the inning with his 20th homer of the season. Alonso doubled with two outs before Vogelbach flied out to the wall in center field.
Teoscar Hernandez led off the seventh with a double and went to third on a groundout by Dominic Canzone before Senga struck out Ty France and Mike Ford.
—Field Level Media