WASHINGTON — President Trump issued an ultimatum to Congress on Thursday night: Pass the GOP heath care bill by Friday or he will leave ObamaCare as it is and work on other issues, sources said.

The commander-in-chief’s stern demand came after a chaotic day on Capitol Hill, in which Republican leaders were forced to postpone a vote on their ObamaCare replacement plan until Friday for fear it did not have the support to pass.

As it became clear the signature proposal was in danger, Trump doubled down by telling Congress that the time for negotiation was over.

“The president said tomorrow there will be a vote,” Rep. Chris Collins (R-NY) told The Post.

“It’s a vote to maintain ObamaCare or it’s a vote to get rid of ObamaCare,” Collins said. “If he can’t get the votes tomorrow, he’ll never get the votes, so it’s time to move on.”

Trump, who personally courted legislators at the White House early Thursday, sent the my-way-or-the-highway message to the Capitol through his budget director, Mick Mulvaney, who addressed House Republicans during a hastily called meeting in the Capitol basement.

“Mick Mulvaney was very direct in saying, we’re done negotiating,” Collins said.

Putting pressure on Republicans, Trump said this will be their one shot to get it done, or he’ll turn his focus to tax reform and immigration.

“This is the only train leaving the station,” White House press secretary Sean Spicer told Fox News on Thursday night.

The White House had already offered concessions aimed at winning support from leery conservative Republicans, including ending rules that all policies had to carry “essential benefits” for things such as hospitalization and pregnancy.

Despite the sweetened deal, House Speaker Paul Ryan decided in the afternoon to cancel the evening vote on the bill, which had ceremoniously been scheduled for the seventh anniversary of the passage of the Affordable Care Act.

The bill would have gone down in defeat with enough “no” votes from conservative Freedom Caucus members, who feel the bill is “ObamaCare Lite,” and from moderates who fear that too many of their constituents will lose coverage.

It’s still unclear whether the bill will have the votes to pass Friday.

Moderates like Rep. Dan Donovan (R-SI) remain a “no” vote, and an updated Congressional Budget Office score will do little to sway those on the fence.

The GOP health care plan will save less money — $150 billion compared to $337 billion over 10 years in the original version — and still mean 24 million fewer Americans will be insured by 2026, the CBO found.

But conservative holdouts lauded the concessions to undo some of ObamaCare’s insurance mandates. Rep. Trent Franks (R-Ariz.), a member of the Freedom Caucus, wasn’t ready to commit to a “yes” vote but told The Post he was “profoundly encouraged” by the improvements to help drive down premiums.

Other conservatives were peeved by the hasty negotiations.

Rep. Thomas Massie (R-Ky.) said his vote went from a “no” to a “hell no.”

Friday’s vote sets up the first major test of whether Trump’s famed deal-making skills can work on an unruly Congress.

After the meeting with Mulvaney, the consequences of letting down the president weighed on members.

“It’s not a perfect bill, [but] it’s better than what we’ve got,” Rep. Dana Rohrabacher (R-Calif.) told The Post. “And if we vote it down, we’ll neuter Donald Trump’s presidency.”