Fernando Tatis Jr. returned to the lineup with a two-run homer that slipped out of center fielder Mason Williams' glove, and the San Diego Padres held off the New York Mets 4-3 on Thursday night.
Tatis' home run was his 17th of the season, tying him for the Major League lead.
Yu Darvish (6-1) pitched effectively into the sixth inning and helped himself with two hits. Mark Melancon escaped a ninth-inning jam when Kevin Pillar grounded sharply into a game-ending double play.
Get top local stories in San Diego delivered to you every morning. Sign up for NBC San Diego's News Headlines newsletter.
Tatis also dashed home aggressively to score on a wild pitch as the Padres ended a four-game skid in the opener of a homestand against two first-place teams.
James McCann hit a two-run homer for the Mets, and Billy McKinney had an RBI triple off the wall in the eighth that nearly tied it as New York fought back from a 4-0 deficit.
Tatis registered his 15th error of the season when he failed to secure a throw from second baseman Ha-Seong Kim on a double-play attempt in the sixth inning. With the bases loaded Pete Alonso gave him another try with a grounder to Kim, this time Tatis made the turn and helped the Padres escape the jam.
He also made a charging play on a grounder in the eighth inning with a man on third and the Padres up a run.
Kim ended the game by fielding a Kevin Pillar grounder, stepping on second base and throwing to first for a game-ending double play.
The win snapped the Padres' season-long four-game losing streak.
LISTEN: With NBC 7 San Diego's Darnay Tripp and Derek Togerson behind the mic, On Friar will cover all things San Diego Padres. Interviews, analysis, behind-the-scenes...the ups, downs, and everything in between. Tap here to find On Friar wherever you listen to podcasts.