AUGUSTA — Lawmakers gave preliminary approval Wednesday night to a political compromise that aims to provide police with another tool to confiscate guns from potentially dangerous individuals.

The Senate voted 32-0 and the House 135-9 in support of a bipartisan measure that allows police to take individuals into “protective custody” based on concerns about their mental health and potential to harm themselves or others. If a medical professional agrees an individual poses a threat, police would then order that person to temporarily surrender his or her guns.

The bill, L.D. 1811, faces additional procedural votes late Wednesday. But the strong initial votes suggest it should pass easily and be sent to Gov. Janet Mills, whose administration helped negotiate the compromise.

If passed, it would be the only gun-related measure to survive the legislative process this year.

On Monday, both the House and Senate rejected a so-called “red flag” bill would have created a new “extreme risk protection order” allowing police to seek a court order to temporarily seize guns from individuals who could pose a threat to themselves or others. Police would have been able to issue such orders based on sworn affidavits from family or household members.

But organizations such as the Sportsman’s Alliance of Maine and the National Rifle Association opposed the “red flag” bill because they said it violated gun owners’ constitutional rights by allowing gun seizures without due process. While bill supporters strongly disputed such statements – pointing to similar bills on the books in 16 other states – Mills’ office worked with lawmakers and the Sportsman’s Alliance of Maine to negotiate the alternative bill.

Both bills would require a judge to hold a hearing within 14 days to decide whether to return guns to the individual or continue withholding them for one year. But in the compromise bill likely headed for final passage, a person’s guns could only be confiscated after a doctor or other medical professional has determined that they could pose a threat to themselves or others.