Republican lawmakers found themselves in a familiar place Thursday: trying to divine what President Donald Trump was thinking just hours before a critical legislative deadline.

In the wee hours of the morning, the president upended his own party’s strategy for avoiding a government shutdown in the form of a 16-word tweet.

The tweet seemed to encourage lawmakers to pass a long-term extension of the Children’s Health Insurance Program (CHIP) outside of a short-term extension of government funding—which is precisely the opposite of what GOP leaders are attempting to do ahead of a Friday night deadline to keep the government’s lights on.

Within minutes, the party’s attempts to woo Democratic votes by adding a six-year CHIP reauthorization to their four-week stopgap spending bill were thrown into chaos. One House GOP leadership aide insisted to The Daily Beast that everything was “fine.” But others acknowledged that lawmakers and aides were left scrambling.

“Frankly nobody knows what the heck he is arguing for. Not playing coy. Literally none of our policy staffers have cracked the code,” a GOP congressional source, granted anonymity to candidly assess Trump’s tweet, told The Daily Beast.

Trump has thrown wrenches into complex legislative debates before—most recently by expressing opposition and then support for a program that allows warrantless surveillance of foreigners. Congressional Republicans have at times been tripped up by his difficult-to-check impulses. At other times, they’ve forged through unscathed.

On Capitol Hill on Thursday, the hope was that the GOP could come together around its government funding proposal despite the president’s social-media missive. Sen. Orrin Hatch (R-UT), one of the sponsors of the original CHIP legislation, said he was attempting to seek clarity from the White House on the matter.

“In recent conversations, the president has been supportive of the bipartisan Senate Finance Committee’s approach to extend CHIP to ensure the nation’s vulnerable children have access to quality care,” Katie Niederee, a spokeswoman for the Senate Finance Committee, which Hatch chairs, told The Daily Beast.

A White House spokesman later said that Trump supported the stopgap bill despite his tweet, and House Speaker Paul Ryan (R-WI) said he spoke with the president Thursday morning and is confident that Trump “fully supports” the measure.

But even before Trump’s tweet, Republicans were facing roadblocks in pushing their proposal across the finish line. And by Thursday afternoon, it became clear that the stopgap bill would not clear the 60-vote threshold in the Senate, with most Democrats and even a handful of Republicans vowing to oppose it.

Republican leaders’ strategy was based on fairly overt political bargaining. A six-year extension of CHIP was being used to lure Democrats into supporting a government funding measure that did not address the fate of undocumented immigrants who were brought to the U.S. illegally as children. Democratic lawmakers have cited a lack of progress on legal protections for so-called DREAMers in opposing any stopgap bill to keep the government open.

Democrats had already started arguing Wednesday that the health care of nine million children was being used as a ploy. On Thursday, they were gloating that the president was taking their side.

“I agree,” Rep. Frank Pallone (D-NJ) tweeted in response to Trump’s brief message. “House Republicans refuse to bring up a clean & permanent CHIP extension and instead are attaching it to a controversial funding bill. They are once again playing politics with children’s health.”

Behind the scenes, Democratic aides were attempting to leverage Trump’s tweet for legislative and political gain. Aides speculated that the president had given Republican lawmakers pause in supporting the measure, and that it could encourage GOP leaders to rethink the idea of pushing a bill that was dependent upon gaining a vast majority of Republican votes in addition to the necessary support among a handful of Senate Democrats to clear the 60-vote threshold.

“The main reaction has been: Why would anyone vote for this bill now? D or R,” a Democratic aide told The Daily Beast. “Seems pretty clear to me, taking him at his word. Doesn’t seem like he likes the current version of the [bill]!”

Some Senate Republicans have complicated matters further by declaring that they will not support the short-term bill, leaving the party with an uncertain path toward securing 60 votes. Thursday morning, Sen. Mike Rounds (R-S.D.) voiced his opposition to the package, joining Sen. Lindsey Graham (R-S.C.). A third Republican senator, Mike Lee of Utah, appears poised to vote against it as well, and Sen. Rand Paul (R-KY) later followed suit.

But on Thursday morning, Senate Majority Leader Mitch McConnell (R-KY) issued a stern warning to his caucus over the idea of voting alongside Democrats to force a government shutdown.

“I hope not a single Republican is inclined to join them,” McConnell said in a letter to GOP senators that was obtained by The Daily Beast. “I know we are all frustrated by the pace of negotiations on spending, but joining Democrats to shut down the government plays right into the Democrats’ hand.”

McConnell, anticipating a shutdown, also advised Republican senators to plan to stay in town through the weekend.