Nothing about this weekend looked promising for the Mets, who returned to New York this past week looking beaten down and beleaguered. They had just been swept by the Nationals and invited plenty of doomsday declarations.

Even with the season short of its halfway point, they made it easy to wonder if they already had ceded their chance to defend the National League pennant.

How quickly things change.

By surviving another white-knuckle evening Saturday night, when they beat the Cubs, 4-3, the Mets positioned themselves to complete a stunning four-game sweep against the team that began the day with the best winning percentage in the National League.

“It’s important,” manager Terry Collins said. “You can believe that you can compete. But when you go out and you do it, that means a lot. The confidence that it sends throughout the clubhouse, there’s no other way to do it.”

Bartolo Colon outpitched Jake Arrieta, who before Saturday night hadn’t lost a regular-season road game in 14 months. Neil Walker hit his 15th homer of the season and Travis d’Arnaud extended his hot streak with a two-run single that proved to be the difference.

Setup man Addison Reed tossed 1 1⁄3 scoreless innings, recording the final out in the seventh after Ben Zobrist’s solo homer off Erik Goeddel sliced the Mets’ lead to one. Reed struck out four. Closer Jeurys Familia saved his 28th straight game to start the season.

“You look at those three games [in Washington] and we got our butts kicked,” d’Arnaud said. “Now the last six games, we’re 3-3. It’s huge for us, a big pick-up, a great way to start the homestand.”

Arrieta, the reigning NL Cy Young Award winner, thwarted the Mets twice in the regular season last year. In those outings, Collins said he had “chewed us up so easily.”

But in Game 2 of the NLCS, the Mets hung a loss on Arrieta, putting themselves on course for a sweep. The Mets had their way again Saturday night, chasing the righthander with one out in the sixth.

After allowing five runs in his previous start, Arrieta gave up four more against the Mets, easily his roughest patch of what has been another superb season.

The Mets capitalized in the first inning on Walker’s two-run shot, his first homer since June 16, a stretch of 55 at-bats. The blast knocked in Brandon Nimmo, who had walked.

“These types of games the last three days, this is the type of baseball that we kind of need to play, whether we’re winning or losing,” Walker said. “We need to play these type of games to get where we want to go.”

Cubs slugger Anthony Rizzo answered with a two-run blast off Colon in the fourth, launching a towering shot that landed in the centerfield batters’ eye.

But the Mets responded in their half of the inning. With runners on first and second and two outs, d’Arnaud lofted a blooper into shallow center. Second baseman Javier Baez got there but failed to make a desperation catch with his bare hand. The ball glanced off his hand and hit the grass to give the Mets a 4-2 lead.

Given the lead for the second time, Colon did not relent. The 43-year-old frustrated the Cubs with his usual array of well-placed fastballs. He froze Kris Bryant to end the top half of the fifth and did the same to Rizzo to begin the sixth. Both times, the sluggers looked back at plate umpire Laz Diaz, incredulous at his strike zone.

“One of the things that the real good pitchers do is if they’re getting a certain pitch called, they stay there,” Collins said of Colon, who wore out the outer edge of the zone. “They don’t try to change anything.”

Cubs manager Joe Maddon launched protests at Diaz, keeping up a steady critique of the umpire as the game progressed.

“Your job is to throw strikes,” said Colon, who pitched through lingering stiffness in his left leg. He departed with a two-run lead, having allowed two runs in six innings. In his last eight outings, he has pitched to a 1.96 ERA.