(Bloomberg) -- Marijuana companies didn’t get exactly what they wanted from Tuesday’s election results, but they may have gotten just what they need.  

Of the five states with marijuana legalization on the ballot, it passed only in Maryland and Missouri -- but that’s still seen as a positive for the industry, given they’re the largest markets in the group.

The election results may also bode well for national legislation given current projections that Democrats might hold the Senate and lose the House. That could encourage the current leading candidate for legislation, known as SAFE Banking, to move forward. 

According to early-morning election results, the recreational-legalization measures in Arkansas, North Dakota and South Dakota fell short of passing. But such states were projected to have relatively small markets anyway. Maryland is by far the most significant state for large publicly traded companies like Curaleaf Holdings Inc., Green Thumb Industries Inc. and TerrAscend Corp., Cowen Inc. analyst Vivien Azer said in a research note.

Shares of several cannabis companies surged on the election news: Canopy Growth Corp. gained as much as 12% and Tilray Brands Inc. climbed 6.3%, while GrowGeneration Corp. advanced 10%. The AdvisorShares Pure US Cannabis exchange-traded fund was up 3.4% at 10:14 a.m. in New York.

Azer estimated Maryland’s medical market in 2021 had more than $500 million in sales, while Arkansas’s had less than half that. Also, the initiatives in the three naysayer states garnered more than 40% of voters’ support, something the industry may take as a positive for overall sentiment.

Read more: Legal weed expands to Maryland, Missouri with ballot victories

Even as control of Congress has yet to settle out with Senate races in Arizona, Nevada and Georgia up in the air, the split that looks likely would be a positive for the marijuana industry, Bill Kirk, an analyst at MKM Partners, observed in a morning research memo. With full control of Congress, Democrats might abandon the SAFE Banking legislation -- a narrow reform that seeks to open access to banking -- in favor of more sweeping legislation that could take longer to push through. Total Republican control could change priorities in the lame-duck session.

--With assistance from Divya Balji.

(Updates with shares in fifth paragraph.)

©2022 Bloomberg L.P.