A US Border Patrol agent during a tour with the US Customs and Border Protection on May 10, 2021 in the Otay Mesa area of San Diego County, California.
CNN  — 

The House voted Thursday to pass a sweeping GOP border security bill after Republican leaders worked to lock down votes and win over holdouts within their own party.

The GOP border bill is dead on arrival in the Democratic-controlled Senate and the White House has issued a veto threat. But it will serve as a messaging opportunity for the House Republican majority on one of their signature priorities. Final passage was been planned to coincide with the expiration of Title 42, a pandemic-era policy that allowed certain migrants to be turned away at the border.

The vote was 219 to 213, with Republican Reps. Thomas Massie and John Duarte breaking ranks to vote no.

The bill would restart construction of a border wall, increase funding for border agents and upgraded border technology, reinstate the “remain in Mexico” policy, place new restrictions on asylum seekers, and enhance requirements for E-verify, a database employers use to verify immigration status.

Republican leaders worked for months to negotiate the border and immigration package, a key piece of legislation for the GOP majority focused on an issue Republican lawmakers ran on in the midterms. But crafting immigration policy has proven complicated for House Republicans, exposing divisions within the GOP conference.

Thursday’s vote took place after House GOP leaders agreed to make last-minute changes to the package amid concerns over various provisions from some of their members.

One issue had been over language that asks the secretary of homeland security to issue a report determining whether Mexican cartels are a “foreign terrorist organization.” Some Republicans pushed leadership to take it out of the bill, concerned it could create a new “credible fear” claim for asylum seekers.

On Wednesday, Florida Rep. Byron Donalds confirmed that leaders would be tweaking the bill to address members’ concern, including an amendment to change the foreign terrorist organization language.

There were also concerns over a provision in the bill to expand E-verify with some Republicans worried that without reworking the agricultural visa program, the provision could make it more difficult for rural farmers to find a pipeline of workers.

Rep. Dan Newhouse, in a tweet on Wednesday, said that leadership had committed to addressing concerns raised over E-verify in the package, and he said he would support the package as a result of those assurances.

The Biden administration’s veto threat against the legislation criticized the measure, saying, “this bill would make things worse, not better.”

The measure “does nothing to address the root causes of migration, reduces humanitarian protections, and restricts lawful pathways, which are critical alternatives to unlawful entry … because this bill does very little to actually increase border security while doing a great deal to trample on the nation’s core values and international obligations, it should be rejected,” the statement said.