The House voted late Friday to eviscerate President Barack Obama’s amnesty program for young illegal immigrants, and prevent Obama from potentially creating a similar program to millions of other illegal residents.

The bill was the second phase of the GOP’s two-step strategy for dealing with the border crisis. In order to pass a spending bill to beef up U.S. border operations, conservative Republicans insisted on legislation to terminate Obama’s 2012 policy that has kept more than 700,000 younger illegal immigrants from being deported.

Barack Obama DACA illegal immigration House Republican Marsha Blackburn border security

The House voted to shut down Obama’s deferred action policy late Friday night, after Republicans claimed the policy violates the Constitution. Chip Somodevilla/Getty Images

Republicans see Obama’s Deferred Action for Childhood Arrivals program as a policy that has drawn tens of thousands of children to the southern U.S. border over the last few years, creating a costly humanitarian crisis.

But even after GOP leaders agreed to hold a vote on DACA, many Republicans said the bill wasn’t tough enough, and insisted on changes. Those changes were made over the last 24 hours and allowed the House to pass it in a 216-192 vote — in the end, 11 Republicans still decided to oppose it, but four Democrats supported it.

The vote is the first significant Republican response to the Deferred Action for Childhood Arrivals program since Obama imposed it two years ago. Taken together, the bill freezing DACA and the border funding bill are likely to be the only immigration measure the House considers this year.

The House vote is a victory for Sen. Jeff Sessions (R-Ala.), who pushed House conservatives to insist on a vote on DACA as a condition for approving a new funding bill. Sen. Ted Cruz (R-Texas) also met with House Republicans this week to press for a tough DACA bill, which he has sponsored in the Senate.

Tension between Republicans and Democrats over immigration has increased steadily over the last several weeks, and it spilled out onto the House floor Friday night. After several minutes of debate, Republicans charged Democrats with ignoring the brewing problems at the border when they controlled the House.

Rep. Tom Marino (R-Pa.) specifically called out Minority Leader Nancy Pelosi (D-Calif.) for failing to take any action when she was Speaker, a charge that prompted Pelosi to cross the aisle and confront Marino.

Marino barked back at Pelosi, “Yes, it is true. I did the research on it. You might want to try it, Madame Leader.”

“Do the research. I did it. That’s one thing that you don’t do,” he said.

Republicans charged that DACA is a violation of the Constitution, since it essentially let the White House re-write U.S. immigration law through an executive order. Rep. Marsha Blackburn (R-Tenn.), the sponsor of the bill, said legislation is needed to stop Obama from ignoring the Constitution.

“What it will do is to tie the president’s hands as to future executive actions that he might take to expand amnesty for illegal entrants into this country,” said Rep. Marsha Blackburn (R-Tenn.). “It would freeze DACA.”

House Judiciary Committee Chairman Bob Goodlatte (R-Va.) added that the bill sends the message that “minors tempted to come here in the future will no longer be rewarded by a president who chooses to use his pen and cell phone to legislate.”

Rep. John Conyers (Mich.), the top Democrat on the Judiciary Committee, said the bill is “one of the most mean-spirited” he’s ever seen. Other Democrats piled on, accusing Republicans of being hell-bent on deporting innocent children.

Rep. Luis Gutierrez (D-Ill.) said the GOP’s motto could be, “deport ‘em all.”

The legislation is opposed by Senate Democrats and the White House. But by passing it, the House could gain some leverage over Democrats if House-Senate negotiations ever occur on an immigration reform or border bill.

Language in the bill would block new applicants from using the DACA program, which would stop current DACA participants from reapplying under the program later this year. That’s a change from the version of the bill considered earlier this week.

It also specifies a ban on funding and prohibits the creation of a new DACA-like program, which is seen by many as a tougher prohibition than what was in the older version.

The new proposal is similar to the older version in that it would stop the government from providing any newly authorized deferred action for any class of unlawful immigrants, or authorizing any such immigrant to work in the United States that is not lawfully admitted. However, the new language again contains a specific funding limitation on these activities.

In addition, the new bill does not create an exemption for immigrants who are paroled. The prior version did include that exemption, which some saw as a possible loophole that could be exploited by the Obama administration.