CHICAGO — Retailers legally selling marijuana for the past month in Michigan say they have drawn customers from surrounding Midwestern states where the drug remains illegal and, as Illinois prepares to joins the recreational market on Wednesday, officials are renewing warnings to consumers against carrying such products over state lines.

The dynamic is familiar for states on the West and East coasts where the sale and use of marijuana has been broadly allowed since Colorado’s market opened in 2014, despite a federal ban that created a patchwork of legal and cultural snares. Nebraska and Oklahoma went so far as to file an unsuccessful lawsuit against Colorado, arguing that its marijuana law would have ill effects for surrounding states.

In the years since, the industry has wrestled with questions over companies’ obligation to pay federal income taxes or follow laws on employee safety. Other thorny issues confronted state regulators, who were forced to determine suitable pesticides for growing cannabis plants, and which ingredients were safe to include in products meant to be eaten or burned. That terrain is usually reserved for federal agencies.

The tensest point, though, remains the illegal market that has survived in states with legal cannabis markets. Some of that product comes from outside the legal systems tracked closely by states’ regulators, while other states have struggled to keep “diverted” legal marijuana from bleeding into the illegal market at home or in far-flung states.

Data also suggests that some customers will cross state lines in search of state-licensed marijuana retailers, despite warnings that it’s illegal to bring the product back home.

The start of legal sales in Michigan on Dec. 1 and in Illinois on Jan. 1 brings that same climate to the Midwest, where some neighboring states allow limited marijuana use for medical purposes. But none other has moved to permit recreational use.

States often differ in the regulation of contentious issues, including guns, speed limits and the drinking age. But Sam Kamin, a professor of marijuana law and policy at the University of Denver, said interstate accusations about the effect of marijuana sales on legal states’ neighbors are likely to linger unless federal law changes.

“Supply and demand tells us it’s going to be a constant thing,” Kamin said. “Regulations can only do so much and once product leaves a state, it ceases to be a regulatory problem and becomes a criminal one.”

Illinois is the 11th state to broadly allow marijuana’s use and sale, shrinking early states’ market advantage and ability to draw tourists. Industry analysts expect “canna-tourism” will remain popular in some places, such as Las Vegas, but that most companies trying to survive in an expensive, challenging industry must build a local customer base.

“Nonresident demand is not going to be the primary driver of revenue in these Midwestern states,” said John Kagia, chief knowledge officer at the industry analytics firm New Frontier Data. “Local consumers will be that primary driver.”

Kagia said available data on nonresident buyers suggests the percentage of traveling shoppers varies dramatically between states. One Colorado study found that about 9% of total cannabis product demand came from visitors to the state, while New Frontier Data estimates that the share of purchases by visitors in Nevada is about 25%.

In Michigan, where $4.7 million of recreational marijuana was sold in the first three weeks of December, regulators do not know how much was bought by out-of-state customers. But shops say business has been brisk, particularly from neighboring Ohio and Indiana and nearby Illinois.

“There’s been people from all over,” said Bart Kupczyk, co-owner and director of retail at Ann Arbor-based Greenstone Provisions, one of 23 Michigan retailers licensed for adult-use recreational sales. “Ann Arbor is close to Ohio. It’s a destination city in its own right as a fairly well-known college town.”

Some 45 miles (70 kilometers) to the south in Morenci, a town of 2,100 people along the Ohio border, a dispensary has reported that a majority of its customers hail from Ohio, where only medical marijuana is legal. Another retailer in Morenci secured its state license last week.

“It is important for residents of Ohio and non-residents traveling through the state to understand possession of marijuana remains a criminal violation in Ohio, even if it is purchased legally in another state which permits recreational use,” said Staff Lt. Craig Cvetan, public affairs commander for the Ohio State Highway Patrol.

Illinois marijuana companies said they have trained employees to remind non-residents that their products cannot legally be transported across state lines and can only be consumed in private residences or hotels that permit it. Cities can decide to allow marijuana consumption at tobacco shops or dispensaries, but none will have rules in place by January, said Pamela Althoff, executive director of the Cannabis Business Association of Illinois.

“If you want to enter into Illinois and participate in consuming cannabis, you need to be responsible and you need to know the law,” she said. “Just like alcohol, this should not be something you plan to consume and then get back in the car.”

Nonresidents can purchase less marijuana than Illinois residents under the state’s new law, and law enforcement in surrounding states have announced plans to strictly enforce their standing restriction on marijuana. Michigan’s single-transaction limit is the same for residents and nonresidents.

At Green Thumb Industries’ five “Rise” dispensaries licensed to sell recreational products in Illinois, employees have been trained to remind nonresidents customers that they can’t bring marijuana products home and to warn them not to drive after consuming, said Dina Rollman, the company’s senior vice president of government and regulatory affairs.

“We’re most focused on serving the people of Illinois, but we recognize that we’re surrounded by states that have not legalized cannabis for recreational use,” Rollman said. “Our focus is just on education for those consumers, so that we can be compliant.”

Eggert reported from Lansing, Michigan.