Gov. Maura Healey filed legislation Thursday that would limit the places where federal immigration enforcement agents can operate in Massachusetts, targeting locations where she said “people go and expect to be safe.”

Healey’s bill would ban warrantless civil arrests by immigration agents in Massachusetts courthouses, and it would also restrict their activities in churches, schools, daycares, hospitals and health clinics.

Referencing the recent fatal shootings in Minnesota, Healey said federal agents are “instigating, antagonizing and, yes, causing violence in communities.”

Support for GBH is provided by:

“I can tell you that this is making no one safer,” she said. “We have people right now in Massachusetts who are afraid to send their children to school or to daycare. People afraid to go to church and worship. People afraid to go the doctor’s for appointments, or take their kids to the pediatrician’s office. People afraid to go to court to testify as victims and witnesses.”

Healey said that if her bill becomes law, Massachusetts officials will “do everything we can to make sure that it’s upheld and that people are protected.”

”I’m going to take charge of what I can take charge of and what I have jurisdiction and authority over, but I really, really hope, sincerely, sincerely that the message is heard: This is not working,“ Healey said. ”This isn’t working. It’s not making anybody safer, and it needs to stop.“

Healey’s bill would also make it unlawful for another state to send its National Guard to Massachusetts without the governor’s permission, and set up a legal process for parents to pre-arrange guardianship for their kids in case they are detained or deported.

The governor’s bill reflects a building momentum on Beacon Hill for some sort of action targeting immigration enforcement activities.

Support for GBH is provided by:

State Senate President Karen Spilka stood alongside Healey during her announcement, and said in a statement that the Senate would “do everything in our power” to pass Healey’s proposal and additional protections into law soon. Lawmakers in the Massachusetts House, meanwhile, plan to huddle in a series of closed-door meetings next week to discuss the new proposals and immigration policy more broadly.

Healey on Thursday also signed an executive order restricting the state agencies she oversees from entering into any new 287(g) agreements — memoranda of understanding that empower state or local law enforcement to act as immigration law enforcement — unless there is a specific need or public safety risk.

The order prohibits federal immigration officers from using state facilities as staging areas or processing locations. It bans civil arrests by immigration agents in non-public areas of state facilities, except when authorized by a judicial warrant or judge’s order.

Asked by GBH News how her administration would respond to litigation from the Trump administration challenging these new policies, the governor said: “We’ll see what they do. But hopefully they’ll see the light and do what I ask for, which is to fix ICE.”

In addition to Healey’s bill, the Massachusetts Black and Latino Legislative Caucus unveiled its own legislation this week to bolster due process rights for immigrants and set detention standards for facilities housing civil immigration detainees.

The caucus’ bill, dubbed the PROTECT Act, is sponsored by Reps. Andy Vargas of Haverhill and Judith Garcia of Chelsea.

Similar to Healey’s plan, the caucus’ bill would prohibit civil immigration arrests in and around courthouses without a judicial warrant or judge-signed court order.

GBH News reported that U.S. Immigration and Customs Enforcement has detained more than 50 people in Boston courthouses since President Donald Trump took office.

Garcia said there are more than 30 incidents where ICE has entered the courthouse in Chelsea over a six-month period, including in hallways, entrances and private spaces.

“When people are afraid to go to court, cases cannot move forward and the system cannot do its job,” she said.

The caucus’s bill would also grant the state attorney general with enforcement authority for when protections granted in the bill are violated. It would limit federal and state collaboration to only criminal cases, with required public notice and participation from relevant state agencies.

“I want to stress this more than anything, the main thing for the members behind me has been keeping in touch with the immigrant families most impacted by what is happening in our community,” Vargas said at a State House press conference on Wednesday.

It would require people applying to state and local law enforcement roles disclose any U.S. Immigration and Customs Enforcement and US Customs and Border Protection employment, or related contracting.

Vargas referenced 37-year-old Alex Pretti’s killing in Minneapolis last Saturday by federal immigration agents.

“Over the weekend, we saw that there are several departments that have very low or no standards for policing across this country,” said Vargas. “So if you are an ICE or CBP officer and you want to come work at a law enforcement agency in Massachusetts, we want to mandate that you have to disclose that experience.”