It wasn't easy, but the Mets squeaked out a 3-2 victory, thanks in part to a go-ahead, bloop single from Mark Vientos in the bottom of the 8th inning.
Juan Soto went 1 for 3 with a single and a walk in his return from a strained right calf, but shortstop Francisco Lindor was removed with left calf tightness after laboring around the bases while scoring from first on Francisco Alvarez's go-ahead double in the fourth.
Byron Buxton tied it 2-all with a leadoff homer in the sixth against Clay Holmes, his second longball in two nights.
Brett Baty, who came off the bench to replace Lindor in the lineup, drew his second walk of the game with two outs in the eighth against Taylor Rogers (0-1). Alvarez coaxed a nine-pitch walk from Justin Topa before Vientos dumped an RBI single into shallow right field. Vientos had blatantly ran through a stop sign rounding third and was easily thrown out at home plate for the final out of the sixth.
Luke Weaver (2-0) retired Luke Keaschall with the bases loaded to end the top of the eighth and struck out three batters in a one-hit ninth to secure New York's first victory since April 7 at home against Arizona.
The 12-game skid was the team's longest since August 2002.
Connor Prielipp, the Twins' top pitching prospect, needed 82 pitches to get through four innings in his major league debut. But the 25-year-old left-hander showcased a good slider and limited a slumping New York lineup to two runs and four hits with six strikeouts and no walks.
Holmes allowed two runs and five hits in seven innings.
Batting cleanup, Lindor drove in a run by legging out an infield single with two outs in the first and Victor Caratini's sacrifice fly tied the score in the fourth.
The Mets hadn't won a game since their 4-3 win against the Arizona Diamondbacks on April 7.
The Associated Press contributed to this report.
----------
* Get Eyewitness News Delivered
* More New York City news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Download our connected TV app