State officials have revoked the license of PharmLabs, one of three marijuana testing labs in San Diego County that had been licensed under California’s new recreational cannabis laws.

Having local labs with state licenses will become crucial later this year when up to 40 indoor pot farms and marijuana edible factories begin to open in the city of San Diego.

Those businesses, which are at varying stages of the city’s approval process, will need to have their products tested under state law.

The two local labs that remain licensed are Coastal Analytical, which has locations in Vista and Sorrento Valley, and Infinite Chemical Analysis Labs in Miramar. They are among 36 testing labs that currently hold temporary licenses, which the state began issuing when recreational marijuana became legal in California on Jan. 1.

The temporary licenses are a precursor to “annual” lab testing licenses that state officials are expected to begin issuing in coming weeks.

The Bureau of Cannabis Control said in a news release that PharmLabs is still eligible for an annual license despite having its temporary license revoked last week.

“The Bureau actively works with licensees to assist them in coming into compliance with state law,” said Lori Ajax, head of the bureau. “However, public safety is our highest priority.”

Greg Magdoff, owner of PharmLabs, said by phone on Tuesday that he remains optimistic that he will obtain one of the first annual licenses in the state.

Magdoff, who launched his business seven years ago, said the license was revoked primarily because his staff couldn’t meet state deadlines to fill out hundreds of documents required for each test they conduct.

But Magdoff said his staff is working toward meeting the state’s stringent requirements, which they support because the goal of the requirements is public safety.

“The entire cannabis industry in California is facing hurdles as we journey into a regulated market,” he said. “We’re charging forward in hopes to be one of the first labs to have an annual license.”

PharmLabs moved its San Diego location from Ocean Beach, where it violated the zoning rules, to an industrial section of the Midway District near the sports arena in July 2017.

Magdoff noted that the other two locations of PharmLabs, Long Beach and the Coachella Valley, have not had their licenses revoked.

© 2018 The San Diego Union-Tribune. Visit The San Diego Union-Tribune at www.sandiegouniontribune.com. Distributed by Tribune Content Agency, LLC.