Republicans blocked an attempt to prevent illegals from joining the military by a slim vote of 211-210 Thursday.

GOP Rep. Paul Gosar forwarded an amendment to end the “backdoor amnesty program” that allows illegals in the country under Deferred Action for Childhood Arrivals (DACA) to enlist in the military, so long as their service is in the national interest, The Associated Press reports.

National interest is defined as having much-needed linguistic, medical or cultural skills. The Pentagon permitted this program two years ago, and the House Committee on Armed Services several weeks ago gave its seal of approval.

So far, 141 DACA immigrants have taken advantage of this program to join the military, according to Gosar. His objections, however, were overruled by a single vote.

Former Marine and Democratic Rep. Ruben Gallego applauded the defeat of Gosar’s amendment and compared its premise to Donald Trump’s attempts to deport illegals.

“I am glad to see that some Republicans are rejecting the tired, anti-immigrant policies promoted by the likes of Donald Trump,” Gallego said.

GOP Rep. Steve King introduced a similar amendment to cut off funding designated for the enlistment of DACA kids.

“The president has relentlessly amended immigration law by executive fiat and executive edict. And this is another time,” King said.

That amendment failed by a vote of 214-207.

The White House has threatened to veto both the House and Senate version of the National Defense Authorization Act.

“The bill is inconsistent with the [Bipartisan Budget Act], and the administration strongly objects to the inclusion of problematic ideological provisions that are beyond the scope of funding legislation,” the Office of Management and Budget said in a statement. “If the president were presented with H.R. 5293, the President’s senior advisors would recommend that he veto the bill.”

Some of these ideological provisions include any attempts to interfere with the administration’s attempt to shutter the prison facility in Guantanamo Bay.

Follow Jonah Bennett on Twitter

Send tips to jonah@dailycallernewsfoundation.org.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.