BOSTON (AP) _ House and Senate negotiators have resolved differences over a proposal to allow for the temporary removal of firearms from people considered a danger to themselves or others.

The so-called ``red flag'' bill appears headed for final approval from Massachusetts lawmakers on Thursday.

The measure would let a relative or someone else with close ties to a legal gun owner petition a court for a 12-month extreme risk protection order if the individual was exhibiting dangerous or unstable behavior.

A person subject to such an order could appeal.

The bill would also regulate stun guns in Massachusetts after the state's highest court ruled that a blanket ban on the devices was unconstitutional.

Republican Gov. Charlie Baker has indicated he's leaning toward signing the bill when it reaches his desk.