MarketWatch:

Mark Twain is said to have remarked that a gold rush is a good time to be in the pick and shovel business. Investors may be able to apply that same bit of wisdom to the growing number of U.S. states that have legalized pot.

Although federal law prohibits the sale or possession of marijuana, Massachusetts last week joined the ranks of states — 18 plus Washington, D.C. — that allow its use for people suffering from chronic illnesses like cancer, HIV/AIDS, multiple sclerosis and epilepsy. In Washington and Colorado, meanwhile, voters passed an initiative to allow pot for recreational use.

Those changes have kickstarted a small but fast-growing medical-marijuana industry, estimated to be worth about $1.7 billion as of 2011, according to See Change Strategy, an independent financial-analysis firm that specializes in new markets. In Colorado alone, sales topped $181 million in 2010, and the business employed 4,200 state-licensed workers, says Aaron Smith, executive director of the National Cannabis Industry Association, a nonprofit trade group that campaigns for marijuana’s federal legalization.

In addition to profiting itself from growing and selling marijuana, the industry benefits a slew of other businesses, such as insurers, lawyers and agricultural-equipment firms, experts say. “Call it the ‘green rush,’” says Derek Peterson, CEO of GrowOp Technology, an online retailer of hydroponics — products used in the cultivation of indoor plants — and a subsidiary of OTC stock Terra Tech. “The industry is expanding, and there are all kinds of investment opportunities.”

For regular investors looking to get in on the action — and without having to actually grow or sell drugs — there are several small-cap stocks that stand to gain from marijuana’s growing acceptance. Medbox, an OTC stock with a $45 million market cap, for example, sells its patented dispensing machines to licensed medical-marijuana dispensaries. The machines, which dispense set doses of the drug, after verifying patients’ identities via fingerprint, could potentially be used in ordinary drugstores too, says Medbox founder Vincent Mehdizadeh. Based in Hollywood, Calif., the company already has 130 machines in the field, and it expects to install an additional 40 in the next quarter. “The smart money is trying to help with compliance and transparency,” Mehdizadeh says.

Of course, investing in drugs the federal government still outlaws poses enormous risks to investors, says Sam Kamin, a law professor and the director of the Constitutional Rights & Remedies Program at the University of Denver. In fact, nearly 500 of the estimated 3,000 dispensaries nationwide have either been closed by the federal government or shut down in the past year, says a spokesman for StickyGuide.com, an online directory and review site for medical marijuana dispensaries — and yet another ancillary business that’s currently seeking investors.

Also on HuffPost:

Loading Slideshow...
  • $13.7 Billion Saved On Prohibition Enforcement Costs

    The government would save an estimated $13.7 billion on prohibition enforcement costs and tax revenue by legalizing marijuana, <a href="http://www.huffingtonpost.com/2012/04/17/economists-marijuana-legalization_n_1431840.html" target="_hplink">according to a paper endorsed by 300 economists</a>.

  • Marijuana Inmates Cost Prisons $1 Billion A Year

    Inmates incarcerated on marijuana-related charges cost U.S. prisons $1 billion annually, according to a 2007 study, <a href="http://www.alternet.org/rights/47815/" target="_hplink">AlterNet reports</a>.

  • Marijuana Prohibition Costs Taxpayers $41.8 Billion A Year

    Including lost tax revenues, a 2007 study found that enforcing the marijuana prohibition costs tax payers $41.8 billion annually, <a href="http://www.forbes.com/2007/09/29/marijuana-laws-work-biz-cx_qh_1001pot.html" target="_hplink">Forbes</a> reports.

  • California Marijuana Crop Worth $14 Billion A Year

    Marijuana growers account for <a href="http://www.time.com/time/nation/article/0,8599,1884956,00.html" target="_hplink">$14 billion a year in sales in California</a>, making it the state's most valuable cash crop, TIME reports.

  • Illegal Marijuana A $36 Billion A Year Industry

    It's estimated that <a href="http://madamenoire.com/106691/capitalizing-on-the-billion-dollar-marijuana-industry/" target="_hplink">illegal marijuana is a $36 billion industry</a> in the U.S., MadameNoire reports.

  • One-Third Of Americans Think Legalization Would Boost The Economy

    About one-third of Americans say they think <a href="http://www.huffingtonpost.com/2010/04/20/legalizing-pot-will-not-b_n_544526.html?" target="_hplink">legalizing marijuana would boost the economy</a>, according to a 2010 poll by Associated Press-CNBC.

  • Dispensary Ads Boost Newspapers' Revenue

    The <em>Sacramento News and Review</em> saw a big boost in ad revenue when it offered advertising space for more than 60 medical marijuana dispensaries, enabling the publication to hire three additional employees, <a href="http://www.news10.net/news/local/article/144285/2/Marijuana-ads-mean-big-money-for-weekly-newspaper" target="_hplink">according to News 10</a>.

  • Mendocino Zip Tie Program Raised $600,000

    Mendocino County, California's zip tie program aimed at regulating medical marijuana growing by charging permits for each plant raised <a href="http://www.huffingtonpost.com/2012/01/09/medical-marijuana-license-mendocino_n_1193198.html" target="_hplink">$600,000 in revenue in for the Sheriff's department</a> in 2011.

  • Oakland Raised More Than $1 Million In Marijuana Tax Revenue

    The city of Oakland, California raised $1.3 million in tax revenue from medical marijuana dispensaries in 2011, 3 percent of the city's total business tax revenue, according to <a href="http://www.nytimes.com/2012/02/12/us/cities-turn-to-a-crop-for-cash-medical-marijuana.html?_r=1" target="_hplink"><em>The New York Times</em></a>.

  • Colorado Pulls In $5 Million From Pot Sales Tax

    In 2011, Colorado pulled in $5 milllion in sales taxes from medical marijuana businesses, <a href="http://www.nytimes.com/2012/02/12/us/cities-turn-to-a-crop-for-cash-medical-marijuana.html?_r=1" target="_hplink"><em>The New York Times</em></a> reports.

  • Legal Marijuana Could Be $100 Billion Industry

    Economist Stephen Easton estimated in 2010 that <a href="http://www.businessweek.com/debateroom/archives/2010/03/legalize_mariju.html" target="_hplink">legal marijuana could be a $45 to $100 billion industry</a>, <em>Bloomberg Businessweek</em> reports.

  • Each weGrow Center Creates 75 Jobs

    When hydroponic marijuana growing supply chain weGrow opens a new store it <a href="http://aznow.biz/small-biz/wegrow-phoenix-opens-cultivates-opportunities-arizona)" target="_hplink">creates an estimated 75 jobs</a> indirectly, according to AZBusiness Magazine.

  • Majority Of States Support Taxing Marijuana

    More than <a href="http://www.huffingtonpost.com/2010/04/20/legalizing-pot-will-not-b_n_544526.html?" target="_hplink">60 percent of states agree with taxing marijuana</a>, according to a poll by Associated Press-CNBC.

  • Marijuana Affects Workplace Motivation

    A Norwegian study 25 years in the making came to the shocking conclusion that <a href="http://www.huffingtonpost.com/2012/02/24/marijuana-use-has-adverse-affect-workplace-motivation_n_1300278.html?" target="_hplink">frequent marijuana use lowers employees' motivation at work</a>.

  • More Than 1,000 Dispensaries In California

    There could be more than 1,000 medical marijuana dispensaries operating in California, <a href="http://www.pasadenaweekly.com/cms/story/detail/how_does_your_pot_grow/8070/" target="_hplink"><em>Pasadena Weekly</em></a> reported in 2009.

  • Denver Counts More Dispensaries Than Starbucks

    As of July 2011, the city of Denver <a href="http://www.huffingtonpost.com/2011/07/06/medical-marijuana-denver-starbucks_n_891796.html" target="_hplink">counted more medical marijuana dispensaries than Starbucks franchises</a>.