In a break from previous votes on the issue, the House on Thursday rejected two GOP proposals to prevent the Obama administration from enlisting young illegal immigrants to serve in the military.

Lawmakers voted down two measures offered by immigration hard-liners Reps. Steve King (R-Iowa) and Paul Gosar Paul Anthony GosarPelosi must go — the House is in dire need of new leadership LWCF modernization: Restoring the promise Trump tweets his people have all left Drudge MORE (R-Ariz.) that would have prohibited the use of federal money to enlist young illegal immigrants who have been granted work permits under President Obama's Deferred Action for Childhood Arrivals (DACA) program.

More than 30 Republicans with more centrist views on immigration joined all Democrats in opposing the two amendments offered to a Defense Department spending bill. The amendments failed narrowly with votes of 207-214 and 210-211, respectively.

ADVERTISEMENT

Certain young illegal immigrants qualify for DACA if they came to the U.S. as minors and have worked toward at least a high school education, among other requirements.

The Obama administration has already enlisted some DACA recipients through a program, Military Accessions Vital to the National Interest (MAVNI), that recruits immigrants with valued foreign language or medical skills to serve in the military. Gosar said the Pentagon confirmed to his office that it had recruited 141 DACA recipients as of April.

The amendments would have blocked the Obama administration from using the MAVNI program to enlist people in the DACA program.

Democrats sought to tie the provisions to the harsh rhetoric on immigration from presumptive GOP presidential nominee Donald Trump Donald John TrumpUS reimposes UN sanctions on Iran amid increasing tensions Jeff Flake: Republicans 'should hold the same position' on SCOTUS vacancy as 2016 Trump supporters chant 'Fill that seat' at North Carolina rally MORE.

“Clearly, House Republicans are taking their anti-immigrant cues from Donald Trump,” said Rep. Ben Ray Lujan (D-N.M.), the chairman of House Democrats’ campaign arm.

“They come here in the spirit of Donald Trump,” Rep. Joaquín Castro (D-Texas) said of the House GOP. “What we’re seeing with these amendments is part of a larger pattern of hostility toward Hispanic Americans on the part of the Republican Party.”

King and Gosar said that the Obama administration is stretching the limits of MAVNI.

“It’s not for the president to use this as a blanket amnesty,” King said.

Rep. Ruben Gallego (D-Ariz.), an Iraq War veteran, argued that the military should be able to recruit anyone who could help the nation.

“Simply put, we shouldn’t let political posturing stand in the way of our military’s requirement goals,” Gallego said.

It’s the second time in a week that House Democrats have used an immigration-related provision in an appropriations bill to try to tie the GOP to Trump.

The annual spending bill for legislative branch operations typically passes with a wide bipartisan majority. But the measure passed largely along party lines last week because Democrats opposed a provision to keep the phrase "illegal alien" in subject headings, contrary to a Library of Congress decision.

Republicans maintained that the phrase simply reflects that some people are in the country illegally. But Congressional Hispanic Caucus Chairwoman Linda Sánchez (Calif.) urged fellow Democrats to vote against the spending bill, arguing that the term “perpetuates racism and promotes hate."

Debate over allowing illegal immigrants to serve in the military nearly sunk the annual Defense authorization bill last year.

The House Armed Services Committee had approved a provision establishing a “sense of the House” that the Pentagon should review allowing DACA recipients to enlist during its markup of the bill. But the House later voted to eliminate the language in response to conservative outcry.