As midnight neared, social media accounts came alive as elected officials and activists on the right dashed off tweets and posts to share their shock.

And in between those posts, there was a flurry of fuming calls and text messages - a blaring political fire alarm among Trump's diehard supporters.

“The reality is sinking in that Trump administration is on the precipice of turning into an establishment presidency,” Sam Nunberg, a former Trump campaign adviser, said in an interview early on Thursday morning.

While the initial wave of fury could change direction as new details emerge, the torrent represented the first major break of Trump's devoted base from the president on a core issue.

Representative Steve King, Republican-Iowa, one of the GOP's biggest immigration hawks, issued a dramatic warning to the President after he scrolled through news reports.

“If AP is correct, Trump base is blown up, destroyed, irreparable, and disillusioned beyond repair,” King tweeted, referencing an Associated Press story on the bipartisan agreement.

He added, “No promise is credible.”

Conservative radio talk show host Laura Ingraham, who is friendly with Trump, mocked him for seeming to shelve the pledge that has animated his supporters since his campaign's launch.

She later added, “BUILD THE WALL! BUILD THE WALL! … or … maybe … not really.”

Trump tried to ease the GOP backlash early on Thursday in a series of tweets that insisted the border wall “will continue to be built” and that no deal was hashed out with Democrats on the so-called undocumented “dreamers.”

“No deal was made last night on DACA. Massive border security would have to be agreed to in exchange for consent. Would be subject to vote,” Trump wrote, referring to Deferred Action for Childhood Arrivals (DACA), an Obama-era programme that has allowed 690,000 dreamers to work and go to school without fear of deportation.

Breitbart News, the conservative website now run by former White House chief strategist Steve Bannon, quickly became a gathering place for aggrieved Trump backers. Readers congregated by the thousands in the comments section for an article with a bright red headline: “Amnesty Don.”

Days earlier, Bannon said on CBS's 60 Minutes that he was “worried about losing the House now because of this, because of DACA,” arguing that Republican voters would lack enthusiasm for Trump and the party if they felt it was drifting to the centre on immigration.

“If this goes all the way down to its logical conclusion, in February and March it will be a civil war inside the Republican Party that will be every bit as vitriolic as 2013,” Bannon said, referencing the stalled fight that year over a comprehensive immigration bill. “And to me, doing that in the springboard of primary season for 2018 is extremely unwise.”

“This a betrayal of the highest order,” a Breitbart editor, who was not authorised to speak publicly, said in a phone call late on Wednesday. “Donald Trump should be ashamed of himself. He wasn't elected to do this.”

The editor was mostly echoed by the site's readers:

“Put a fork in Trump. He is done.”

“PRIMARY TIME!!!!”

“What a HUGE let down.”

“I can reconcile Trump caving on virtually any issue, Amnesty and not building the wall are not one of them.”

Adding to the tumult in the deep of night: conflicting accounts over what exactly Trump and Democrats had brokered.

Aides to Senate Minority Leader Chuck Schumer, Democrat-New York, and House Minority Leader Nancy Pelosi, Democrat-California, insisted that Trump had agreed not to request wall funding as part of their pact to soon move legislation to help undocumented immigrants who are protected by DACA, an executive order established by President Barack Obama in June 2012.

White House Press Secretary Sarah Huckabee Sanders tweeted at 10.21pm: “While DACA and border security were both discussed, excluding the wall was certainly not agreed to.”

Eleven minutes later, Matt House, an adviser to Schumer, tweeted: “The President made clear he would continue pushing the wall, just not as part of this agreement.”

Sanders's Twitter assurance, however, did little to calm the roiled voices, especially in the populist-nationalist wing of the Republican Party - a wing deeply linked to Trump.

“Deep State Wins, Huge Loss for #MAGA,” Fox Business anchor Lou Dobbs tweeted, alluding to Trump's “Make America Great Again” campaign slogan.

Others who have supported Trump's immigration positions took a wait-and-see approach amid the chaos.

“My sense is that he told Chuck and Nancy what they wanted to hear, and they heard what they wanted to hear. I think there could be some mischief-making on the part of Schumer since the White House is walking it back,” said Mark Krikorian, an immigration hard-liner who runs the Center for Immigration Studies, in an interview.

Meanwhile, Fox News host Sean Hannity, who is in regular contact with Trump, directed his ire over the developments not at the president but at GOP leaders on Capitol Hill.

Donald Trump's international Presidential trips Show all 22 1 /22 Donald Trump's international Presidential trips Donald Trump's international Presidential trips French President Emmanuel Macron and US President Donald Trump AFP/Getty Images Donald Trump's international Presidential trips French President Emmanuel Macron and US President Donald Trump talk as they leave the Army Museum at Les Invalides in Paris AFP/Getty Images Donald Trump's international Presidential trips German Chancellor Angela Merkel and US President Donald Trump arrive for the group photo at the G7 Taormina summit on the island of Sicily in May 2017 Getty Images Donald Trump's international Presidential trips Mr Trump was pressed on the subject at the G7 summit in Italy Getty Donald Trump's international Presidential trips US President Donald Trump gives a speeech at the Warsaw Uprising Monument on Krasinski Square Getty Donald Trump's international Presidential trips US President Donald Trump and Britain's Prime Minister Theresa May during a ceremony at the NATO headquarters before the start of a summit in Brussels, Belgium Reuters Donald Trump's international Presidential trips Montenegro's Prime Minister Dusko Markovic is seen to the right of Donald Trump at a Nato summit in Brussels REUTERS Donald Trump's international Presidential trips Pope Francis meeting with US President Donald J. Trump EPA Donald Trump's international Presidential trips Pope Francis poses with US President Donald Trump and First Lady Melania Trump AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump arrives at Palazzo del Quirinale ahead of the meeting with Italian President Sergio Mattarella Ufficio Stampa Presidenza della via Getty Donald Trump's international Presidential trips US President Donald Trump is seen during a joint press conference with the Palestinian leader at the presidential palace in the West Bank city of Bethlehem AFP/Getty Images Donald Trump's international Presidential trips Palestinian president Mahmoud Abbas meets US President Donald Trump PPO via Getty Donald Trump's international Presidential trips Israeli Prime Minister Benjamin Netanyahu speaks with US President Donald Trump prior to the President's departure GPO via Getty Images Donald Trump's international Presidential trips US President Donald Trump and Israel's Prime Minister Benjamin Netanyahu shake hands after delivering a speech at the Israel Museum AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump and First Lady Melania Trump lay a wreath in the Hall of Remembrance as White House senior advisor Jared Kushner and Ivanka Trump watch on during a visit to the Yad Vashem Holocaust Memorial museum AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump visit to Yad Vashem Holocaust museum in Jerusalem accompanied by Prime Minister Benjamin Netanyahu GPO via Getty Images Donald Trump's international Presidential trips US President Donald Trump takes his seat before his speech to the Arab Islamic American Summit in Riyadh in Saudi Arabia Reuters Donald Trump's international Presidential trips Saudi Arabia's King Salman bin Abdulaziz al-Saud, US President Donald Trump and US First Lady Melania Trump look at a display of Saudi modern art at the Saudi Royal Court in Riyadh AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump and Saudi Arabia's King Salman bin Abdulaziz al-Saud take part in a signing ceremony at the Saudi Royal Court in Riyadh AFP/Getty Images Donald Trump's international Presidential trips King Salman presents Donald Trump with The Collar of Abdulaziz al-Saud Medal at the Royal Court Palace on 20 May AP Donald Trump's international Presidential trips US President Donald Trump is welcomed by Saudi King Salman bin Abdulaziz al-Saud upon arrival at King Khalid International Airport in Riyadh AFP/Getty Images Donald Trump's international Presidential trips U.S. President Donald Trump and first lady Melania Trump walk on the South Lawn prior to their first foreign trip Getty Images

“Well Mitch GREAT JOB!” Hannity tweeted, referring to Senate Majority Leader Mitch McConnell, Republican-Kentucky. “You failed so miserably with Healthcare and 'excessive expectations' now @POTUS has to deal with Dem Leaders!”

Hannity added later, “I blame R's. They caused this. They wanted him to fail and now pushed him into arms of political suicide - IF TRUE.”