Two companies will supply Minnesotans with certain ailments medical marijuana beginning next year.

One of them will be located an hour away from Alexandria – LeafLine in St. Cloud.

Patients in some parts of the state, however, will be forced to drive hours if they want to take part in the new state program.

The state Health Department announced Monday that Cottage Grove-based LeafLine Labs and Minnesota Medical Solutions in Otsego will be allowed to grow marijuana and process it into liquid, pills and vapor to help people with specific illnesses. Both are for-profit firms.

A state law passed earlier this year allows patients to begin receiving medical cannabis, the official name of medical marijuana, but continues to make it illegal to use the plant itself, including smoking it.

Twenty-nine organizations originally expressed interest in growing and producing medical marijuana products, and a dozen submitted applications.

LeafLine, partially owned by the Bachman floral family, plans to open a distribution center in Eagan next year, with sites in Hibbing, St. Cloud and St. Paul opening by July 1, 2016.

Minnesota Medical Solutions already has facilities built in Otsego and is expected to begin growing plants this week. Patients should be able to buy its products next July in Rochester, Maple Grove, Minneapolis and Moorhead.

MinnMed and LeafLine distribution sites are tentative because before they open they must receive local government approval. Also, state officials may decide to change the sites to better serve patients.

While one location where medical marijuana will be distributed is in each of the state’s eight congressional districts, officials admit it will be a long haul for some patients. In Luverne, for instance, the nearest distribution center is in St. Cloud, 199 miles away.

LeafLine co-founder Dr. Gary Starr said more sites may be needed.

“Our goal is to safely provide medical cannabis products to patients with qualifying conditions...” state Health Commissioner Dr. Ed Ehlinger said. “Our attention over the next few months will be on working with these two manufacturers to implement the program and safely grow, process and distribute the products.”

Marijuana takes four months to more than six months to mature, so some plants could be ready before a July 1 deadline.

While the two companies are set to grow marijuana, state officials are not asking how they obtain seeds or starts for the plants. It’s illegal under federal law to transport them across state lines and state law makes it illegal to grow marijuana anywhere but in the two facilities.

Starr said that last week he treated a 75-year-old women who might have benefited from medical marijuana. “She was in severe pain,” he said, but “I could not solve the problem” with medicines now available.

“This is a great day for about 5,000 suffering Minnesotans and their families,” MinnMed co-founder Dr. Kyle Kingsley said of the estimated number of people who could benefit from medical marijuana.

Minnesota is the 22nd state to approve use of medical marijuana. Some doctors doubted whether it should be legalized and some law enforcement officers feared that inadequate security could lead to marijuana plants being available to Minnesotans.

The state’s medical marijuana program is more controlled than others like Washington, Colorado and California, Kingsley said.