Across Massachusetts, municipalities are figuring out how to get rapid tests into the hands of undocumented immigrants — while keeping out other towns' residents who might want to cross municipal boundaries and stock up on rapid tests.

Some towns and cities are changing their approaches to distributing tests — asking for an ID or a piece of mail with their address to prove their residence when they didn’t before, or giving tests to local nonprofits or churches that are trusted by local undocumented residents — in an effort to meet both needs. Undocumented immigrants often worry about accessing health services or being asked for identification by government entities, fearing that their immigration status will be outed and immigration enforcement alerted.

The city of Springfield received nearly 170,000 at-home rapid tests from the state in December, part of the Baker administration's initiative to get 2.1 million rapid tests to 102 communities with large portions of families below the poverty level.

Springfield gave them out at nine libraries and through local community organizations in neighborhoods with low vaccination rates. People were asked to provide a Springfield address to receive their test kits — but not an ID in an effort to distribute tests quickly before the holidays. That’s changing with its next round of test distributions.

“We found that there were entities coming from other cities and towns around us, giving a Springfield address and zip code,” said Helen Caulton Harris, commissioner of the Division of Health and Human Services. “So with this last allocation, we are asking for something that proves that the individual is a resident of the city of Springfield.”

Caulton Harris said the city acknowledged its many undocumented residents could be worried about having to prove they’re local residents with the new process. It came up with a workaround: giving kits to community-based organizations who know who is undocumented in Springfield and who are trusted by undocumented individuals. The organizations, in turn, hand out the kits, and those picking kits up do not have to show proof of residency.

“Those organizations deal with undocumented individuals on a daily basis — providing shelter, clothes, information — and so they do know who they are in their neighborhoods, and that is the strategy,” she said.

Springfield just bought another 25,000 iHealth rapid tests to be distributed to locals starting today at community centers on a first-come, first-served basis, with each household able to get two kits with two tests each. The city is expecting another 30,000, all purchased with federal COVID-19 relief funds.

Chelsea was another of the 102 municipalities that received rapid tests through the Baker administration’s initiative last month. Like Springfield did, the city asked for people to provide Chelsea addresses when it handed out its 15,000 tests. But unlike Springfield, it’s sticking with that approach.

“We don’t require proof of residency or an ID because a lot of people may not have documentation from the state because they are here undocumented,” said Flor Amaya, Chelsea’s director of public health. She said many undocumented people in Chelsea work in the service industry and face a high exposure to COVID-19, and that getting rapid tests to them was a priority.

In Lawrence, 75,000 tests were distributed in December, with more coming. When asked about how the city is getting rapid tests to undocumented residents, Board of Health director Michael Armano said the city is taking steps toward equitable distribution.

“There’s people where English is not their first language. So we need to make sure that we communicate effectively, starting with our vaccination program, to our testing program and now distributing these at-home tests,” he said. Local organizations reached out to undocumented immigrants during the last round of tests and will again in the future.

In Worcester, the city didn’t require proof of local residency in the December distribution of rapid test kits, according to city manager Edward Augustus Jr.

He said the city is working to support different immigrant populations, including nearly 300 recently resettled Afghan refugees.

“The groups that are working with them, I've given them several boxes to support those families to make sure that they can test regularly,” Augustus said in a phone interview. For the city’s large Ghanian and Brazilian populations, local organizations and churches received kits and distributed directly to those groups.

Some locales, like Rockland, required a valid state ID to get a rapid test kit in an effort to get limited test numbers into the hands of every resident.

“There were a lot of out-of-town people that we had to turn away,” said Delshaune Flipp, one of the town’s Board of Health agents.

On whether this has posed an issue for local undocumented immigrants, Flipp said the issue hasn’t come up yet, but if they didn’t have a valid state ID, a piece of mail would suffice.