AUGUSTA, Maine — The Legislature took the first steps Wednesday in what could be a compromise on a controversial gun issue. 

The Mills administration and the Sportsmen’s Alliance of Maine have negotiated a new version of what’s called a 'red flag" bill, dealing with guns and mental illness. The bill would provide mechanism to temporarily take dangerous weapons away from people in a mental health crisis who are believed to pose a threat of violence.

RELATED: Parkland survivor, gun control advocate speaks with Maine legislators, students
RELATED: 'Red flag' bill likely to stir new gun control debate

The Legislature’s Judiciary Committee heard arguments for and against the plan at Wednesday’s hearing. 

The compromise bill uses existing law that lets police take people into protective custody who are thought to be in a mental health crisis. They must be quickly evaluated by medical professionals, who then determine if the person poses a threat of violence to themself or others. 

If they do represent a threat, any dangerous weapons would be taken away for 14 days. Then, a court hearing would decide what happens next. The bill also requires a treatment plan for the person.

Democratic Sen. Mike Carpenter, who also helped develop the bill, says it's an effort to balance the legitimate needs and concerns on both sides of the gun issue.

"I represent a lot of people in northern Maine," said Carpenter, "who value their gun rights but also a lot of people who care about the epidemic of gun violence in this country."

There appears to be broad support for the bill. David Trahan of the Sportsmen’s Alliance of Maine, who helped negotiate the agreement, says gun rights groups are not opposing the bill, and his group is actively supporting it. That represents a major political change in the gun issue.

Maine Moms Demand Action, which describes itself as a gun violence prevention group, says it is neither for nor against the bill.

It says it "appreciates that the Sportsman's Alliance and other gun rights groups are beginning to recognize that something needs to be done about gun violence," but feels "the Red Flag bill is a more comprehensive bill that addresses the many circumstances in which a dangerous individual may have access to a gun, rather than focusing solely on those who are dangerously mentally ill."

Maura Pillsbury of Freeport says they want the original and controversial red flag bill, which relies on an initial court hearing to decide if guns should be removed. She says the compromise doesn’t do enough to control guns.

"I believe it places the focus on mental health rather than guns and access, which is the real issue here," Pillsbury says.

The Maine Gun Safety Coalition says it is also supporting the compromise, calling it "a good start".

A representative of Maine prosecutors said many of them support the compromise, and Trahan said there appears to be a lot of support among Legislators.