The juxtaposition was impossible to miss. And if October arrives, and the Mets are packing their belongings because they’ve wasted a season rife with promise, they’ll know exactly how it came to be.

The Cardinals are the National League’s best team with runners in scoring position. The Mets are the worst. In Wednesday night’s wrenching 5-4 loss, the difference presented itself over and over again, ultimately costing the Mets ground in the standings.

Historically, the defeat will go down as the end of Jeurys Familia’s remarkable streak of 52 consecutive saves, the third longest in the history of baseball.

“I never in my life thought I could do that in the big leagues,” said Familia, who hadn’t blown a regular season save since the infamous July 30 rain game against the Padres.

With the Mets ahead 4-3 in the ninth, Jedd Gyorko worked a one-out four-pitch walk ahead of Yadier Molina’s game-tying double to centerfield. Two batters later, Kolten Wong laced a double to left to score Jeremy Hazelbaker from second base.

“This is really a tough one to take,” manager Terry Collins said.

advertisement | advertise on newsday

But the Mets’ undoing flowed not from Familia’s rare misfire, but from an offense that has made a habit out of failure. Indeed, the Mets wasted so many chances that even Yoenis Cespedes’ dramatic go-ahead, two-run homer in the seventh inning became merely a footnote.

“It’s baseball,” Cespedes said through a translator. “Until the 27th out, you don’t know the results.”

The Cardinals, who began the day hitting an NL-best .294 with runners in scoring position, finished 3-for-9. It meant a critical series victory and costly setback for the Mets, who continue to tread water — win one, lose one, win one, lose one, etc.

They lost ground to both the Nationals and Marlins, who won earlier in the day. The Mets trail the Nats by 5 1⁄2 games in the NL East, and they are 1 1⁄2 games back of the Marlins for the second wild-card spot.

Cespedes had given the Mets hope win the seventh. With the count full, Cardinals righthander Adam Wainwright reached into the archives. He flipped a curveball, the same pitch that once froze Carlos Beltran not far from here. But his 117th and final pitch wasn’t nearly as sharp as the one that traumatized the Mets a decade ago.

Mets videos

Cespedes pounced, unleashing the powerful swing that sent the ninth pitch of the at-bat crashing into the facing of the second deck in left-center.

Before Cespedes’ seventh-inning home run, the Mets had fallen to 1-for-11 with runners in scoring position. They had pinned Wainwright to the ropes all night long, though they scored only on a Neil Walker single in the second and a wild pitch in the seventh.

When Cespedes stepped to the plate, with a runner on second and his team trailing 3-2, he hadn’t homered since July 5. Meanwhile, Wainwright hadn’t surrendered a home run since May 28, a stretch of 67 1⁄3 innings, the longest such streak in baseball. It’s part of the reason that he began the game with a 0.93 ERA in July, the lowest in baseball.

Wainwright came within one strike of extending his homerless streak. But his curveball did not fool Cespedes, whose mighty drive unleashed a roar from the crowd.

“All of a sudden,” Collins said, “the game set up in our favor.”

advertisement | advertise on newsday

The homer chased Wainwright, who allowed four runs on 11 hits in 6 2⁄3 innings. He was outpitched by the Mets’ embattled fifth starter, Logan Verrett, who logged one of his best outings of the season. He allowed three runs in the third inning and little else.

“Today was a very productive outing,” Verrett said. “I kept us i the game, gave us a chance to win.”

But the Mets paid dearly for their failure to hit when it counts. The Mets entered play hitting .207 with runners in scoring position. They finished 2-for-14 on Wednesday night and 4-for-33 in the three-game series.

The Mets had fallen behind Wainwright, rallied to take the lead on Cespedes’ homer. With six outs left to get, Collins turned the game over to one of the best late-game duos in baseball: Addison Reed and Familia. It wasn’t enough to hide their failures in the clutch.