LANSING, Mich. (AP) — Michigan Gov. Gretchen Whitmer gave final approval to a red flag law that aims to keep guns away from those at risk of hurting themselves.

The signing comes in the wake of Michigan’s second mass school shooting.

The governor announced her Monday plans via Twitter.

“This afternoon I’ll add to the list of measures we’ve already taken to reduce gun violence in Michigan,” she said.

Gov. Whitmer added that the signing comes more than a month after she signed safe storage and universal background checks into law.

“But there’s still work to be done,” she continued. “We must continue taking commonsense action to reduce gun violence.”

Whitmer signed the legislation just outside of Detroit Monday afternoon.

Lt. Gov. Garlin Gilchrist II, Attorney General Dana Nessel and former Congresswoman Gabby Giffords joined the governor for the signing.

Michigan officials smile following the signing of Michigan’s red flag law.

Giffords began campaigning for gun safety after she was shot in the head in 2011 in Tucson, Arizona.

Michigan joined Minnesota as the second state in less than a week to implement a red flag law after Democrats in both states won control of both chambers and the governor’s office in November.

New Mexico previously was the last state to pass a red flag law in 2020.

The new law, also known as extreme risk protection orders, will go into effect next spring.

The law will allow family members, police, mental health professionals, roommates and former dating partners to petition a judge to remove firearms from those they believe pose an imminent threat to themselves or others.

The judge would have 24 hours to decide on a protection order after a request is filed. If granted, the judge would then have 14 days to set a hearing, during which the flagged person would have to prove they do not pose a significant risk. A standard order would last one year.

Michigan is the 21st state to implement a red flag law. Questions remain of whether the state will have better success in enforcing it than others have.

An Associated Press analysis in September found that in the 19 states then with red flag laws, firearms were removed from people 15,049 times since 2020, fewer than 10 per 100,000 adult residents.

Some local sheriffs in Michigan have told The Associated Press that they won’t enforce the law if they don’t believe it’s constitutional. Over half of the state’s counties have passed resolutions declaring themselves Second Amendment sanctuaries, opposing laws they believe infringe on gun rights.

The U.S. is on a record pace for mass shootings so far this year.

Gun violence within schools has rocked Michigan in recent years. A total of seven students have been killed, and 12 others injured, in school shootings at Oxford High School in 2021 and Michigan State University in 2023.

Earlier this month, two school districts in Michigan banned backpacks as a results of fears of firearms being brought into schools. The ban at Grand Rapids Public Schools came after a third-grader brought a loaded gun into the school.

The red flag law is the final piece of legislation to be signed in a sweeping 11-bill gun safety package advanced by Michigan Democrats following the Feb. 13 shooting at MSU.

Michigan Democrats, who are in control of all levels of state government for the first time in 40 years, have indicated that they plan to advance further gun safety measures.

“I’m not going to get out in front of the legislature. I want to see where their aptitude is and what their appetite is for doing more in the space,” Whitmer told the AP earlier this month when asked what gun measures she hoped to pass next.

She added, “I do think it’s important that we continue to see what more we can do to keep people safe.”