In a surprise move hours before ICE agents were scheduled to conduct raids in search of undocumented immigrants in cities across the country, President Trump announced on Twitter that he was suspending the order scheduled for Sunday, but issued a stern warning that he wanted a swift legislative solution or the “Deportations start!”

“At the request of Democrats, I have delayed the Illegal Immigration Removal Process (Deportation) for two weeks to see if the Democrats and Republicans can get together and work out a solution to the Asylum and Loophole problems at the Southern Border,” Trump tweeted Saturday afternoon. “If not, Deportations start!”

The ICE raids were expected to target undocumented immigrant families in 10 U.S. cities and target about 2,000 people. Leaders in several major cities, including Chicago, Houston, and Los Angeles, issued statements condemning the expected raids.

Trump’s announcement came amid political battles over the raids: between political parties, and within Trump’s own administration.

Republicans are currently pushing congressional Democrats to increase funding for ICE. But Sunday’s planned mass deportations were a sticking point with prominent Democrats, including House Speaker Nancy Pelosi, who called the raids “heartless” on Saturday, and called on Trump to “stop this brutal action.”

After Trump’s Saturday announcement, Pelosi said she “welcomed” the delays. “Time is needed for comprehensive immigration reform. Families belong together,” Pelosi said in a statement.

New York Attorney General Letitia James echoed that sentiment. “With news of a delay of mass raids on migrant families across the nation, New Yorkers can breathe a short sigh of relief. Immigrants should have never been placed in jeopardy by a president who is willing to rip families apart in order to score points with his base,” she said in a statement.

Some within the Trump administration reportedly saw the Sunday raids as a political misstep. In the lead-up to the planned deportations, Acting Department of Homeland Security Secretary Kevin McAleenan was reportedly apprehensive about the optics of deporting families, and worried that the move could lose Republicans leverage in their push for more ICE funding, CNN reported

Former ICE director Tom Homan fueled speculation of a rift during a Saturday Fox News segment where he accused McAleenan of “resisting what ICE is trying to do.”

In his Fox News appearance, Homan seemed to imply that McAleenan or his staff had been responsible for leaking information about the Sunday raids to the media. Current administration officials seemed to share that suspicion, with two reportedly telling BuzzFeed News that McAleenan or his staff had put the raids at risk by slipping information to the media.

The mass deportations might be stalled, but immigrant rights organizations have accused Trump of using the families as a bargaining chip in the funding battle with Democrats.

“Trump is psychologically torturing & holding thousands of families ransom to get what he wants,” RAICES, a Texas-based immigrant legal service group tweeted after Trump’s announcement Saturday.

“We demand that Democrats give #Not1Dollar more to this admin for more internment camps/raids & asylum laws not be changed. We ask the community to be ready to mobilize.”

The cancellation of the raids comes amid new reports of horrific conditions in migrant detention facilities, where children have reportedly been found in filthy conditions, or unresponsive from untreated medical issues.

Until his announcement, Trump appeared wholeheartedly behind the raids, even defending them on Saturday morning.

“The people that Ice will apprehend have already been ordered to be deported,” he tweeted Saturday morning. “This means that they have run from the law and run from the courts. These are people that are supposed to go back to their home country. They broke the law by coming into the country, & now by staying.”

The tweet was consistent with his long-running threats about mass deportations.

He was also reportedly upset with McAleenan, whom Homan and current Trump administration officials have blamed for the raids’ delay. On Saturday, McAleenan was at the White House, a source told CNN, and “not in a good way.”

This is a developing story.