DENVER (Reuters) - The Colorado legislature on Monday passed a “red flag” bill that would allow those deemed a threat to have their firearms seized, despite opposition by most of the state’s sheriffs and threats of legal challenges.

FILE PHOTO - Confiscated weapon components are seen during a news conference about a gun bust at New York City Police (NYPD) Headquarters in New York, U.S., May 24, 2018. REUTERS/Brendan McDermid

Both chambers of the Democratic-controlled General Assembly approved the measure, sending it to the desk of Governor Jared Polis, also a Democrat, who has indicated his support for the measure.

If signed into law, Colorado would become the 15th state to enact similar legislation, also called Extreme Risk Protection Orders, according to a statement from statehouse Democrats.

Under the legislation, a family member or law enforcement officer could petition a judge to seize firearms from a person they think is a threat to themselves or others. The judge could then hold a hearing without the targeted person being present and grant a temporary order for 14 days.

After the two-week order, both the petitioner and the gun owner could then try to persuade a judge why the firearms should or should not be returned.

About 50 of the state’s 62 elected sheriffs oppose the measure, according to Weld County Sheriff Steve Reams, who told Reuters he would not enforce the law because it could put his deputies at risk if they raid a home without prior notice.

‘UNCHALLENGED STATEMENTS’

The Second Amendment to the U.S. Constitution guarantees citizens the right to keep and bear arms. Opponents say the Colorado measure goes too far because it does not allow for a person to be heard in court before a judge issues a gun removal order.

“Unchallenged statements made by a petitioner before a judge ... would be sufficient for law enforcement to enter that person’s home and confiscate their private property,” the National Rifle Association (NRA) said in a statement.

One of the proposal’s sponsors, House Rep. Tom Sullivan, said he ran for elected office after his son Alex was killed in a mass shooting at a Colorado movie theater in 2012.

“This bill will give law enforcement and families the tools that they need to stop tragedies from constantly happening and save lives,” said Sullivan, a Democrat.

The board of commissioners in heavily-Republican El Paso County passed a resolution last month vowing to “actively resist” the law, including taking legal action, if it is enacted.

Colorado Attorney General Phil Weiser, a Democrat, told lawmakers he believes the bill is constitutional and vowed to defend it in court.