While the rest of the country has undergone a polar shift in their views on marijuana, Montana seems stuck in the ’90’s.

Four states and the District of Columbia have legalized recreational marijuana use and 23 other states have eased restrictions on the drug, but Montana could soon be the first state to lose its medical marijuana.

In 2004 Montana legalized marijuana for medicinal use and pot business boomed; at one time the state, home to one million residents, boasted 30,000 patients and 4,900 providers.

Then in 2009, the federal government released a memo ordering federal prosecutors to pursue other criminal cases instead of prosecuting marijuana offenders who were obeying their state laws.

Free from the threat of persecution pot doctors and providers flooded the state and the number of patients they served blossomed.

Those were the heady days of Montana’s medical marijuana industry as traveling clinics distributed marijuana licenses to large numbers of patients and providers set up shop on every corner.

Unfortunately for the movement, some of those places included across the street from churches, and that’s what may have ultimately doomed the state’s medical marijuana.

An opposition movement was born as Montana citizens began to associate the state’s medical marijuana industry with other crimes.

Then in 2011, the Drug Enforcement Administration raided marijuana providers across the state after an 18-month investigation, and attorneys prosecuted them under federal marijuana law.

Stop begging for a joint and demand accountability. Why Montana Is Going Backward on Medical Marijuana http://t.co/IuClnDXltT via @nbcnews — Arlin Troutt (@USHEMP) August 16, 2015

As public sentiment turned, the Montana legislature passed a law in 2011 known as “repeal in disguise” that made it illegal for providers to make a profit and limited the number of patients they could help to three.

The number of providers in the state shrank from 5,000 to less than 400.

The Montana Cannabis Information Association sued the state to repeal the law and won some early success.

The state Supreme Court asked the judge in the case to reconsider his decision and the provisions limiting the number of patients providers could help and the ban on profit making were put on hold.

Now, however, that law is again the subject of a state Supreme Court decision due as early as October and the decision may seal the fate of Montana’s medical marijuana industry.

SAN FRANCISCO - JULY 13: A worker at the Alternative Herbal Health Services cannabis dispensary packages medicinal marijuana July 13, 2006 in San Francisco. (Photo by Justin Sullivan/Getty Images)

The argument now has to do with whether the state legislature had the right to pass its “repeal in disguise.”

There is currently no state ballot legalizing marijuana on the ballot nor does the state’s legislature appear ready to take up the issue.

If opponents have their way, Montana’s medical marijuana industry could soon be a thing of the past.

Photo by Justin Sullivan/Getty Images