BOISE, Idaho (AP) — Republican Idaho lawmakers fed up with what they see as the federal government encroaching on states' rights advanced a proposal Wednesday that would allow Idaho to declare federal laws or regulations unconstitutional.

The move came despite warnings from the state attorney general that the proposal is likely illegal.

With just four lawmakers — two Republicans and two Democrats — opposed, the 15-member House State Affairs Committee agreed to send the proposal to the House floor for debate.

Rep. Paul Shepherd, a Republican from Riggins, said his bill could be used to deny citizenship to the babies of immigrants living in the United States illegally.

"Maybe it's not a big deal but it costs us millions of dollars because people sneak in, have babies and get our taxpayer money," Shepherd said.

The 14th Amendment, ratified in 1868 in the aftermath of the Civil War, granted citizenship to "all persons born or naturalized in the United States." At the time, it included recently freed slaves.

Other lawmakers said the proposal was needed to ban gay marriage from being recognized in Idaho because the state Constitution still contains a same-sex marriage ban. In 2015, the U.S. Supreme Court overruled Idaho's ban limiting marriage to heterosexual couples.

"I believe this provides a reasonable procedure for challenging federal court decisions that affect state sovereign decisions," said Rep. Vito Barbieri, a Republican from Dalton Gardens who voted in favor of the bill.

Shepherd introduced a similar bill last year, but the proposal never got a hearing. He has previously backed legislation that would nullify the U.S. Environmental Protection Agency and a resolution to impeach federal judges who don't follow the Constitution's original intent.

A review by Republican Attorney General Lawrence Wasden's office said the active obstruction of federal law called for by the latest bill would likely not hold up in court.

"Due to the Supremacy Clause, the state Legislature and state executive officers must 'enact, enforce, and interpret state law in such fashion as not to obstruct the operation of federal law," Brian Kane, assistant chief deputy for the attorney general's office, wrote in a 2017 review of Shepherd's bill.

Kane also said the Idaho Legislature cannot be forced to pass legislation to comply with federal directives.

HB 461 now heads to the House floor for debate.