LOS ANGELES — A higher percentage of California marijuana products are passing strict safety tests, but the sudden closing of a lab that state authorities found wasn't correctly checking for pesticides has raised new questions about the system intended to protect the purity and potency of legal cannabis.

California broadly legalized marijuana at the start of the year, and mandatory testing began in July 1. During the first two months the failure rate was about 20 percent, but state data collected through November showed improvement — about 14 percent of nearly 24,000 products were blocked from store shelves by tests.

Cannabis-infused cookies, candies and tinctures continued having the most trouble in test labs: About 26 percent were rejected, though that also was an improved rate compared to the July-August period, when one-third failed.

"With any news rules, there's always going to be a period of adjustment that takes place," said Alex Traverso, a spokesman for the state Bureau of Cannabis Control. "The cannabis industry in California adapts pretty quickly, and I think that's what we're seeing with these lower fail rates in testing. That's encouraging."

The integrity of the testing program was shaken last month when Sacramento-based Sequoia Analytical Labs surrendered its license after state regulators found it was conducting faulty tests for pesticides, apparently since the program kicked off at midyear.

State regulators asked retailers and distributors to recall any batches tested by the company after July 1. Any batches returned by consumers must be destroyed. Products pulled back from a company's inventory can be retested with state permission, or destroyed. But it's likely many of those products already have been consumed.

It wasn't immediately clear how much cannabis was cleared by the lab for sale, but it's almost certainly a large amount, covering five months of testing. The state has issued only a few dozen lab licenses.

State regulators declined to comment on specifics of the case, other than to confirm the company no longer holds a license to test cannabis in the state.

In a statement posted on its website, the company blamed the flawed tests on a faulty instrument that failed to check for 22 of 66 required pesticides. The company said it terminated its lab director who "knew about this and was secretly falsifying the results" since July 1. The company said it is seeking to have its license reinstated.

The lab did not return a phone call or email from The Associated Press seeking comment.

Swetha Kaul, chief scientific officer at Santa Ana-based testing company Cannalysis who sits on the board of the California Cannabis Industry Association, said there are concerns that some companies might not be getting sufficient oversight from regulators.

At this point, it remains unclear how one company was able to falsify test results for so long.

"We need more labs. We need better labs," she said. "We have bad actors, just like every other section of the industry."

In the high-stakes cannabis market, it's obvious that testing companies — the pathway to the legal market — could be targets for abuse, either from unscrupulous producers eager to pay for favorable results, or labs willing to sweeten results to attract more business.

There have been scattered reports of apparent problems. In Washington state in 2017, regulators suspended certification of a pot lab after auditors found an unusually low number of samples had been failed in certain cases. The company never regained certification.

California for months has been reviewing a vast set of regulations that govern the legal market, including setting standards for testing labs. Those revised rules are expected to be finalized early next year, replacing temporary ones that have been guiding businesses since broad legal sales kicked off Jan. 1.

Josh Drayton of the California Cannabis Industry Association said it's an open secret in the industry that companies have been known to pay for favorable test results. He said California needed rigorous rules to keep out shady operators.

"We don't want to create a pay-to-play system with our testing labs," said Drayton, who was unfamiliar with details of the Sequoia case. "We do need to make sure we get standard operating procedures."

The state has been facing pressure to revamp testing requirements that have been alternately described as going too far or not far enough. Others say the tests add too much to the cost for consumers, providing another reason for customers to turn to a black market that still flourishes in California.

Current rules require all cannabis products clear a range of tests at labs before reaching consumers, from ensuring THC, the compound that gives pot its high, is distributed evenly in chocolate bars to making sure buds have not been contaminated by fuzzy blankets of mold.

From July 1 through Nov. 30, labs tested 23,864 batches of various products, and 3,373 failed. The test results through November showed that about 90 percent of buds are cleared for sale, suggesting a mostly clean market for growers.

The biggest reason for failure is improper claims on labels, such as overestimating a product's potency, which blocked over 2,100 products from sale. The California Growers Association, an industry group, is among those concerned the state is forcing growers and manufacturers to hit too tiny a target when gauging levels of THC.

Pesticides, meanwhile, accounted for over 700 rejections in various products.