The Internal Revenue Service (IRS) is on the verge of shutting down California's largest medical marijuana dispensary, and with it potentially the entire semi-legal pot industry.

The Harborside Health Center in Oakland -- which was going to be the subject of a Discovery Channel reality show called "Weed Wars" -- now owes the IRS $2.5 million in back taxes, thanks to the recent enforcement of a federal law that prohibits organizations that traffic in "controlled substances" from taking tax deductions.

Those deductions, for things like payroll, workers' compensation insurance and the like, were taken by Harborside in 2007 and 2008, meaning they owe significantly over the roughly $500,000 Harborside paid in federal taxes both years. Harborside also paid the city of Oakland about $1.1 million and the state of California another $2 million. Just last week owner Steve DeAngelo presented the city with another $360,483 tax payment, and even sent out a press release about it.

DeAngelo was quick to tell reporters that he will likely appeal the ruling, although his tax bill could grow exponentially once the IRS completes audits of his 2009 and 2010 filings.

If DeAngelo's appeal fails, it's over: Harborside will close up shop. So too will most of the other medical marijuana dispensaries in California, if the IRS pursues the same tax tactic state-wide.

It was not immediately clear whether this would affect the Discovery Channel's plans for "Weed Wars."

Harborside posted over $22 million in revenue in 2010 and boasts that it serves over 94,000 customers as the nation's largest marijuana dispensary.

Just 16 states have legalized medical marijuana, but already it has grown into a $1.7 billion industry, and experts expect it will double those revenues within just five years.

A Discovery Channel spokeswoman did not respond to a request for comment.

Photo: Flickr user Damian Gadal.