Nico Hoerner hit a tiebreaking RBI single with two outs in the eighth inning, and the Cubs stopped a nine-game slide by topping the New York Mets 3-2 on Sunday.
Christopher Morel sparked Chicago's winning rally with a leadoff infield single against Drew Smith (1-3). Morel advanced to third on Willson Contreras' single and scored on Ian Happ's tapper to the right of the mound.
After Seiya Suzuki popped out, Hoerner's third hit of the day drove in Contreras from second for a 3-2 lead.
Rowan Wick (2-5) pitched a scoreless inning for the win, and Robertson got three outs for his 13th save.
New York (58-35) had won four in a row and five of six overall. Coming off a taxing doubleheader Saturday that included two extra-inning victories, it closed out a 5-2 trip and headed into the break with a 2 1/2-game lead over Atlanta in the NL East.
The Mets had a chance to open a 3-1 lead in the eighth, but rookie left fielder Nelson Velazquez threw out Lindor when he attempted to score from second on Eduardo Escobar's single.
David Peterson worked five effective innings for New York, and Pete Alonso snapped a tie with a well-placed RBI single. Lindor and Starling Marte had two hits apiece.
Peterson yielded an unearned run and three hits. With Jacob deGrom nearing a return from a stress reaction in his right scapula, Peterson could be moved back to the bullpen when New York returns from the break.
It was a sorely needed victory for Chicago (35-57), which had a rough series against New York right up until the very end. The Cubs scored four times and left 24 runners on base in the first three games of the four-game set.
Chicago was helped by another solid performance by Adrian Sampson, who was charged with two runs and six hits in 5 1/3 innings. He threw a career-high 112 pitches, 69 for strikes.
Sampson was hurt by a pair of shaky defensive plays.
With two out and runners on the corners in the first, Sampson picked off Lindor at first. But Lindor avoided shortstop Hoerner's tag attempt with a dive to the ground, and Marte scampered home on the back end of what was scored as a double steal.
Alonso's fifth-inning popup landed just out of the reach of first baseman Frank Schwindel and in front of right fielder Suzuki, driving in Brandon Nimmo for a 2-1 lead.
The All-Star game is next.