The battle over the controversial “red flag” gun bill overcame its first hurdle in the Colorado Senate Friday on a party line vote as members of the Democrat-controlled chamber heard impassioned pleas from gun rights advocates to kill the measure. The measure now moves to the appropriations committee and will move to the Senate floor if approved.

House Bill 19-1177 would allow law enforcement and families of those who are mentally ill and present a risk to themselves or others to petition a judge for an “extreme risk protection order,” or ERPO, to temporarily remove firearms and provide involuntary mental health treatment. Guns would be returned to the owner when the judge determined mental health is restored.

The bill would require that a hearing be held within the first two weeks of the ERPO and that a court appointed lawyer be provided for the person who is thought to be a threat. The order could be extended up to a year if the judge finds the threat continues to exist.

Some police chiefs and sheriffs across Colorado support the bill, but others, especially in rural areas, oppose it. Some county governments have even passed resolutions saying their sheriffs would not have to enforce the law in their counties. But supporters of the measure say that every law enforcement officer in the state would be bound to enforce a court order.

The bill follows the shooting death of Douglas County Sheriff’s Deputy Zach Parrish, who was trying to take a known mentally ill man into custody at a Douglas County apartment complex. Four other law enforcement officers and two civilians were wounded in the incident, and the mentally ill lawyer, Matthew Riehl, was killed in a subsequent shootout.

Democrat Alec Garnett, the House Majority Leader, introduced the bill in the lower chamber with the showing of a portion of the Insight with John Ferrugia documentary, “Imminent Danger.” The program details the history of Matthew Riehl and the restrictions on both the his family and law enforcement in trying to have him treated for mental illness prior to becoming an “imminent danger” to himself and others. Garnett has cited the documentary as being instrumental in helping viewers understand the issue.

The bill’s main sponsor is Rep. Tom Sullivan, a Democrat from Centennial, whose son was murdered in the Aurora theater shooting. The Aurora shooter’s parents, Bob and Arlene Holmes, appeared in the RMPBS documentary talking about the warning signs they missed in their mentally ill son.

Governor Jared Polis has pledged to sign the bill into law if it comes to his desk.