House conservatives on Thursday voted down a nonbinding provision aimed at helping young immigrants without permanent legal status enlist in the military, angering some fellow Republicans and handing Democrats a political issue heading into an election year.

The vote was 221-202 to remove the measure from Congress' annual defense policy bill. Some 20 Republicans voted "no" but couldn't overcome conservatives who threatened to oppose the overall bill if they didn't get their way.

"This Congress should support and represent Americans by voting to stop military service opportunities from being taken from struggling American families in order to give them to illegal aliens," GOP Rep. Mo Brooks of Alabama, who led the fight, argued on the House floor ahead of the vote.

The handful of Republicans on the other side of the issue struggled to round up votes. Their job was made harder because Democrats had already decided to vote against the defense bill for unrelated budgetary issues, giving Brooks and his supporters leverage to bring down the bill if they didn't prevail.

"This is a mistake," said Rep. Carlos Curbelo, a freshman Republican from Florida. "It sends the wrong message to the country. I assure you that the overwhelming majority of Americans are for allowing young people who were raised in this country, who love this country and want to serve it, to have that opportunity."

Democrats wasted no time in jumping on an issue that could help them mobilize Latino voters heading into a presidential election year. House Democratic leader Nancy Pelosi, D-Calif., and her top lieutenants held a press conference to denounce Republicans over the issue, and presidential candidate Hillary Rodham Clinton also got in on the action. She issued a statement from her political director, Amanda Renteria, saying: "If these courageous young men and women want to serve, they should be honored and celebrated, not discriminated against."

The debate revived the simmering partisan dispute over executive actions President Barack Obama took last fall to defer deportations for millions of immigrants in this country illegally, including expanding protections for those, known as Dreamers, who arrived in the United States as young children. Many Republicans argued that supporting the provision included in the defense bill would have validated the actions Obama took, which have been challenged in court and are on hold pending a ruling by the 5th U.S. Circuit Court of Appeals.

"The House should not take action to legitimize the president's unconstitutional overreach," said House Judiciary Chairman Bob Goodlatte, R-Va.

Other Republicans argued that the $612 billion defense policy bill, which covers a multitude of military issues, was not the place for a debate on immigration.

The measure by Rep. Ruben Gallego, D-Ariz., would have expressed the House's view that the Pentagon should study whether military enlistment should be opened to Dreamers. It was added to the defense bill during a marathon committee session last month, with the support of six Republicans. But several Republicans asserted Thursday that it shouldn't have been included in the first place, suggesting that perhaps it only was because the debate occurred so late at night and people were not fully focusing.

"It went for 18 hours, late in the process one of our members offered an amendment to insert the immigration issue into this bill, it was unfortunate and it was inappropriate," said Rep. Bradley Byrne, R-Ala.

Gallego disputed that argument, saying his amendment was offered around 10:30 p.m., which he asserted was not overly late.