STATE REGULATORS GAVE the final okay for two cannabis testing labs to begin analyzing recreational marijuana, one of the last remaining steps before retail stores can open – more than two years after voters legalized the sale of pot.

The Cannabis Control Commission on Wednesday authorized MCR Labs of Framingham and CDX Analytics of Salem to commence testing operations. Both labs have been testing medical marijuana in the state for years.

The first retail stores are expected to open in about two weeks, and the initial outlets will be medical marijuana dispensaries that have been approved to expand their operations. Under state regulations, the medical marijuana dispensaries can also transfer up to 45 percent of their inventory to the retail operations.

Because the medical pot has already been lab tested, inspectors from the cannabis commission will certify the results with the labs and spot-test some of the marijuana at the stores to determine it meets regulations for potency and contamination levels. Once that is done, the stores can open.

The clearance from the commission Wednesday for the labs to commence recreational pot testing requires a three-day waiting period to alert local officials and police and fire. Once that period passes, they can begin testing recreational marijuana once it is grown. No non-medical cultivation or manufacturing operation has yet been given the clearance to begin operations for adult use marijuana.

Michael Kahn, president and founder of MCR Labs, said testing usually takes two to five days from a subset of product taken form a batch selected by the retailer. Once the marijuana is deemed to pass standards, the batch is certified in the state’s seed-to-sale tracking system and ready for sale.

Kahn said he knows everyone is impatient for sales to begin, but getting all the parts of the industry to work together takes time. “Everybody just wants to get it right,” he said. “I’m a chemist. I don’t know how regulations work but we’re ready on the science part.”