U.S. Rep. Alexandria Ocasio-Cortez’s planned endorsement of U.S. Sen. Bernie Sanders is a boon for the Vermont senator’s flagging presidential campaign and a blow to progressive front-runner Elizabeth Warren — though strategists say it might ultimately work in her favor.

The freshman New York Democrat’s endorsement was highly coveted in the Democratic presidential primary race. Ocasio-Cortez’s backing of Sanders — coupled with an endorsement from U.S. Rep. Ilhan Omar (D-Minn.) — provides a shot of adrenaline to his campaign following his recent heart attack and lets him claim he’s the party’s standard-bearer for progressive ideals — both at Warren’s expense.

“I think it’s probably a huge disappointment for her. She has momentum and obviously everyone’s treating her as the front-runner, and this is a chink in the armor,” said veteran pollster John Zogby.

But Ocasio-Cortez and Omar bring “baggage” that Warren now gets to avoid carrying on her path to the nomination, he said.

“At some point everybody’s got to reach out to the independents and the moderate Republicans” Zogby said — as well as more moderate Democrats. “Arguably one way not to do that is to get an endorsement from Alexandria Ocasio-Cortez and Ilhan Omar.”

Philadelphia-based Democratic strategist Neil Oxman said, “If I were running her campaign, I would have thought, ‘We dodged a bullet.’ ”

Word of the progressive Squad leader’s decision to back Sanders spread at the end of the fourth Democratic presidential debate Tuesday, as Warren underwent her first true trial-by-fire as a front-runner for the nomination. The Massachusetts senator was repeatedly battered by moderates on stage over some of her most far-left policies — including her support of Sanders’ “Medicare for All” — raising questions about her electability outside of liberal strongholds.

Even as Warren avoids the AOC label, Republican strategist Mike Dennehy said the senator is “doomed to be a progressive no matter what.”

“She’s too far along to appeal to the moderate wing of the party,” Dennehy said. “Now she just has to try and keep the momentum that she has and try to stop Bernie Sanders from rising back up.”

Ocasio-Cortez may be able to rally her national following around Sanders, strategists say — bolstering him at the time when he needs it most and taking some of the sting out of the Working Family Party’s endorsement of Warren over Sanders. The group backed Sanders in 2016.

Ocasio-Cortez’s decision to support Sanders — her formal announcement is expected to come during his “Bernie’s Back” rally Saturday in New York City — was likely born more out of loyalty than political cunning, strategists said.

Waleed Shahid, communications director of Justice Democrats, the group behind Ocasio-Cortez’s rise, cited her work for Sanders’ last presidential bid and their shared democratic socialist values.

“I think maybe because of her stardom, people might have forgotten of her associations with Bernie,” Shahid said, adding Ocasio-Cortez was “in part inspired to run for Congress” by Sanders’ 2016 campaign.

But D.C.-based Democratic strategist Patrick Dorton said, “Bernie is a sinking ship and this is an endorsement out of obligation not excitement.”