THE RACE FOR a vacant central Massachusetts Senate seat between a Republican and a Democratic state representative could be an early indicator of whether the emergency shelter crisis in Massachusetts will reverberate politically.

The issue certainly has potential. Massachusetts has an emergency shelter law that requires the state to provide shelter to homeless families with children and pregnant women. The 1983 law attracted little attention until earlier this year, when migrants from a number of countries began arriving in the United States and heading to Massachusetts. What started as a trickle has turned into a flood.

Gov. Maura Healey declared a public emergency on August 8, but that did almost nothing to stem the tide. The budget for the program is spiraling out of control and still the flow of migrants continues. So on Monday Healey placed a hard cap on the size of the emergency shelter program – a cap the state is expected to hit in two weeks — and sought to place the blame on the federal government.

“We need everyone to understand that we are entering a new phase of this shelter challenge,” Healey said on Monday. “Massachusetts will continue to rise to this challenge. That’s who we are. But I want there to be no doubt, this is a federal problem that demands a federal solution.”

On Beacon Hill, Democrats are in control so there has been almost no criticism of the governor’s handling of the crisis. There has been criticism of the federal government, but very little aimed directly at President Biden.

One area of the state where the emergency shelter crisis may become a political issue is in the race for the Senate seat vacated by Anne Gobi of Spencer, who resigned her post in June to take a job in the Healey administration as director of rural affairs. Two state reps, Democrat Jonathan Zlotnik of Gardner and Republican Peter Durant of Spencer, are facing off in what is shaping up to be one of the most intriguing races this year.

Durant had a primary opponent and Zlotnik did not, so the two candidates haven’t engaged much yet. Durant says the largely rural district is taking a strong interest in two issues on Beacon Hill — the shelter crisis and gun control. Durant has become an outspoken conservative voice on both issues, opposing the gun control legislation and raising concerns about the viability of the emergency shelter law in the face of such a large influx of migrants from other countries. Durant has called for the emergency shelter law to be revoked or for it to be targeted at US citizens only.

In a telephone interview, he also raised concerns about the overall cost of supporting so many people coming into the state from other countries. He said an estimate in 2012 put the total cost at $2 billion a year, but he believes that bill has more than doubled to $5 billion. Other Republicans have raised the $2 billion figure in the past, but it couldn’t be independently verified.

Zlotnik did not immediately respond to messages left at his State House and campaign offices. His campaign website talks about supporting small businesses, public schools, veterans, first responders, and increasing funding for infrastructure.

In a mid-September interview with the Athol Daily News, he said he is focused on economic development, housing, transportation, and education. “It’s no secret that this district is a purple district,” he told the newspaper. “It’s one of the few that’s represented in the House, not just by Republicans and Democrats, but the only Independent member of the Legislature has turf in this Senate district. I’ve shown over the last 11 years that I’m not just capable and willing, but eager to work across party lines to work with my colleagues, and to work with local officials as well.”

Durant said the two candidates are expected to appear at a forum together later this week and at other similar events in the next few weeks. He said he doesn’t know where Zlotnik stands on the emergency shelter law and gun control.

“I have to believe that’s going to come up,” Durant said.