PALM BEACH, Fla. — President Trump spent his Easter morning here on an anti-immigrant tirade, declaring Sunday that there would be no deal to legalize the status of undocumented immigrants known as “dreamers” and threatening to exit the North American Free Trade Agreement unless Mexico increases border security.

Trump thrust the future of millions of undocumented immigrants who were brought to the United States as children into peril by promising “NO MORE DACA DEAL,” and he directed congressional Republicans to pass tough anti-immigration legislation.

An hour after he wished Americans a “HAPPY EASTER,” Trump fired off three tweets in which he vented, sometimes in all caps, about immigration laws he derided as “ridiculous” and “dumb” and about border enforcement he deemed dangerously lax.

In his first of the immigration-related tweets, Trump wrote, “Border Patrol Agents are not allowed to properly do their job at the Border because of ridiculous liberal (Democrat) laws like Catch & Release. Getting more dangerous. ‘Caravans’ coming. Republicans must go to Nuclear Option to pass tough laws NOW. NO MORE DACA DEAL!”

 It was Trump who last fall canceled the Deferred Action for Childhood Arrivals program, which was begun in the Obama administration to provide temporary protection to dreamers.

The president added, “Mexico has got to help us at the border. . . . They flow right through Mexico; they send them into the United States. It can’t happen that way anymore.”

President Trump’s position on DACA has taken several twists and turns over the years.

Trump in the past has promised to show “great heart” in dealing with DACA. In his comments Sunday, he appeared to be confused about the rules of the program. To qualify, immigrants must have lived in the United States since 2007, have arrived in the country before age 16 and have been younger than 31 on June 15, 2012. No one arriving in the country after that date is eligible.

After canceling DACA, Trump said he would like to reach a deal with Congress to protect dreamers from deportation in exchange for funding to build his long-promised wall at the U.S.-Mexico border. The president, however, went on to reject immigration proposals from congressional Democrats in recent months.

“Catch and release” is not a law, but shorthand for immigration officials freeing up detention center space by allowing immigrants to remain at large if they are not seen as security risks. The Trump administration has frequently claimed that the policy ended when the new president took office.

But detention centers have continued releasing low-risk immigrants, as the backlog of immigration court cases reaches the hundreds of thousands. On March 5, Attorney General Jeff Sessions informed immigration court judges that they could rule against asylum seekers without full hearings, which conservatives see as a way, in the long term, to open more space in detention centers.

Trump — who has spent his time in Palm Beach hanging out with family, playing golf with friends and watching television — may have tweeted in response to commentary on Fox News Channel, which he is known to view regularly.

“Fox & Friends” aired a segment earlier on Sunday morning about Central American migrants traveling through Mexico en route to the United States. It carried the headline: “CARAVAN OF ILLEGAL IMMIGRANTS HEADED TO U.S.”

Trump’s Sunday comments may have been mere musings by an impassioned “Fox & Friends” viewer and may not signal a substantive shift in administration policies. Still, White House officials have long said Trump’s tweets are official presidential statements, and he has been known to use Twitter to preview formal policy pronouncements.

Trump sent his tweets on the fourth and final day of his vacation in Palm Beach, Fla., where he has been staying at his private Mar-a-Lago Club with a small coterie of aides. White House Chief of Staff John F. Kelly did not travel with him, but senior policy adviser Stephen Miller, a proponent of hard-line immigration policies, has been with Trump.

The president also has been spotted spending time — both over dinner Friday at Mar-a-Lago and on Saturday at the nearby Trump International Golf Club — with Fox host Sean Hannity. An outspoken immigration hard-liner, Hannity is a Trump booster and informal presidential adviser, in addition to hosting a radio show and prime-time Fox show.

Trump’s tweets baffled some Democrats, who had seen the president distinguish between DACA recipients and other immigrants who are in the country illegally.

“Time and time again, the president has walked away from bipartisan proposals that are exactly what he asked for,” said Drew Hammill, a spokesman for House Speaker Nancy Pelosi (D-Calif.). “When an agreement to protect the Dreamers is reached, it will be despite this president rather than with his leadership.”

Rep. Don Beyer (D-Va.) said on Twitter that Trump had once again revealed a racial animus behind his immigration policy. “The mask of deceptions and lies with which Trump has tried to gaslight the country for months just fell away: ‘no more DACA deal.’ ” Beyer tweeted. “His true position was always anti-immigrant.”

Rep. Luis V. Gutiérrez (D-Ill.), a leading advocate for a DACA deal in the House, tweeted that Trump had “demonstrated his complete ignorance” on immigration policy.

“Everyone who qualifies for DACA must show they lived in US almost 11 years ago,” he wrote. “Apparently every day is April Fool’s Day at White House.”

Conservative reaction to the tweets was relatively muted, and no Republican member of Congress had a comment or statement Sunday afternoon. At Breitbart, the tweets were reported as Trump refusing to “negotiate a deal between the GOP establishment and Democrats,” in “a return to his ‘America First’ immigration agenda.”

On Facebook, the conservative author Ann Coulter, who had condemned Trump for not securing border wall funding so far this year, urged the president to show and not tell.

“Try to get a message to the commander in chief for that wall,” she wrote.

But some Republicans joined the chorus of criticism. Ohio Gov. John Kasich, a GOP primary opponent of Trump in 2016 and possibly again in 2020, tweeted in response: “A true leader preserves & offers hope, doesn’t take hope from innocent children who call America home. Remember, today is Easter Sunday. #DACA #Hope”

Rep. Ileana Ros-Lehtinen (R-Fla.), a supporter of immigration reform who represents Miami and is retiring this year, took a sarcastic approach: “Such a strong message of love and new beginnings from @realDonaldTrump on Easter Sunday.”

By calling for Republicans to use the “Nuclear Option” to pass tough immigration measures, Trump seemed to urge a parliamentary procedure by which Senate Republicans could pass legislation with a simple majority of 51 votes as opposed to the 60-vote majority required to end debate and bring a vote to the floor.

But in mid-February, just 36 of the Senate’s 51 Republicans backed an immigration bill that mirrored White House demands. Congressional negotiations on DACA stalled just weeks later, when the Supreme Court upheld a decision that prevented the Trump administration from denying new program renewals.

The court’s move effectively nixed a March 6 deadline that the administration had set for ending DACA. Before leaving for Easter recess, Congress passed an omnibus spending bill with no DACA fix, even though advocates saw that as the best must-pass vehicle for one.

Trump lashed out at Mexico in his second of the three tweets Sunday. He threatened to “stop” NAFTA unless Mexican authorities do more to secure the border with the United States.

Trump wrote: “Mexico is doing very little, if not NOTHING, at stopping people from flowing into Mexico through their Southern Border, and then into the U.S. They laugh at our dumb immigration laws. They must stop the big drug and people flows, or I will stop their cash cow, NAFTA. NEED WALL!”

And in the third tweet, the president wrote, “These big flows of people are all trying to take advantage of DACA. They want in on the act!”

Trump’s tweets come amid tense negotiations over NAFTA between his administration and that of Mexican President Enrique Peña Nieto. A call between the two men in February became testy after Trump refused to publicly affirm Peña Nieto’s position that Mexico will not pay for the wall’s construction, leading the Mexican leader to cancel a planned visit to Washington.

Weigel reported from Washington.

Philip Rucker is the White House bureau chief for The Washington Post. He previously has covered Congress, the Obama White House, and the 2012 and 2016 presidential campaigns. He joined The Post in 2005 as a local news reporter.