WASHINGTON — Bisbee, a city of 5,200 tucked into the mountains of southeastern Arizona, has been a haven for artists and left-leaning types since the 1970s. The old mining town has art galleries, live music venues, and stories – many of them revolving around the supposedly haunted Copper Queen Hotel – in abundance.

Until a few years ago, Bisbee also had plenty of something it didn’t want: plastic bags. They sullied the streets, helicoptered through the air and draped the cactuses, according to Mayor David M. Smith. The problem grew so dire that in 2012, the town barred retailers from providing plastic bags to customers.

Some local businesses opposed the ban, but most residents were thrilled, according to Smith. “It made a huge difference,” said the mayor, who voted for the ordinance as a member of the city council. “After, they were all gone.”

But that was just the beginning of Bisbee’s bag battle. The Arizona Food Marketing Alliance, which represents the state’s grocers and food suppliers, lobbied the Legislature for legislation that would quash Bisbee’s ban and prevent other cities and towns in Arizona from following its lead. In 2015, they succeeded.

Republican lawmakers typically tout the benefits of local control. But in states across the country, they have taken action to rein in cities that want to enact progressive measures such as gun control laws and minimum wage hikes. Now plastic bags have become an unlikely flashpoint in the conflict between blue cities and their red state legislatures.

In recent years a handful of states – Arizona and Missouri in 2015, Idaho, Michigan and Wisconsin in 2016, Minnesota in 2017 – have enacted “bans on bans,” joining a group that already included Florida, Indiana and Iowa.

State Sen. Warren Petersen, the Republican who led the push for Arizona’s law, said it is intended to protect individual rights. In addition to prohibiting plastic bag bans, the measure prohibits local governments from regulating the use of boxes, bottles and containers “used for transporting merchandise to or from a business.”

“It’s not the government’s job to tell you whether or not you should use a plastic bag,” Petersen said. “Are we going to micromanage every decision of every consumer?”

The issue also has attracted national players. The American Progressive Bag Alliance, an offshoot of the Plastics Industry Association, has spent millions of dollars to defeat the local bans and support legislation that preempts local governments from implementing them. And the American City County Exchange, an offshoot of the conservative advocacy group the American Legislative Exchange Council — better known as ALEC — has drafted model legislative language for prohibitions on bag bans.

“A patchwork of bag laws is never good for the consumer and never good for businesses,” said Matt Seaholm, executive director of the American Progressive Bag Alliance. “It should be done at the state level if it’s that important of an issue.”

In Arizona, Bisbee refused to repeal its bag ban – until last fall, when the threat of losing nearly $2 million in state aid finally forced it to relent.

“The state was basically extorting us, saying that we either had to repeal this ordinance or lose our state sharing revenues,” Smith said. “That would have literally bankrupted the city.”

Several towns and cities in Maine have adopted restrictions on the use of plastic bags, including Portland.