SALEM, Ore. — The agency overseeing Oregon’s legal medical marijuana industry conceded in a report Thursday it has not provided effective oversight of growers and others in the industry, creating opportunities for weed to be diverted to the black market.

The blunt internal review echoes complaints from federal authorities that Oregon hasn’t adequately controlled its marijuana businesses, and that overproduction of pot is feeding a black market in states that haven’t legalized it.

Oregon was one of the first states to legalize medical marijuana in 1998, and in 2014 voters approved allowing recreational use. The state’s struggle to transform a business that for decades had operated illegally in the shadows into a regulated industry sets an example for other states moving toward legalization.

Oregon Health Authority Director Patrick Allen ordered the internal review amid complaints from state and local law enforcement officials about lack of oversight of the pot industry. The health authority directs the state’s Medical Marijuana Program, while the Liquor Control Commission regulates recreational pot.

The review showed there were more than 20,000 grow sites, but only 58 inspections were carried out in 2017.

The Oregon Medical Marijuana Program has far too few inspectors, while the tracking of growers and the pot they produce has been inadequate and inaccurate, the report concluded.

“Potentially erroneous reporting coupled with low reporting compliance makes it difficult to accurately track how much product is in the medical system,” the report said. “This limits OMMP’s ability to successfully identify and address potential diversion.”

The report said the medical marijuana oversight agency lacks reliable, independent tools to validate grow site locations and relies on inconsistent county databases.

Law enforcement authorities say they often have trouble identifying which marijuana growers are legal. Seen from a helicopter just before harvest season, marijuana grows are like a green patchwork across one southwestern county, one drug enforcement officer recalled.

In Deschutes County, the sheriff and district attorney in February went public with their frustrations, saying the state was allowing black market operations to proliferate through lack of oversight. They asked the Health Authority to provide a list of medical marijuana grow sites, but the agency refused, saying the law doesn’t permit it to provide such a list. The agency could only respond on a case-by-case basis.

Deschutes County District Attorney John Hummel commended OHA director Allen for ordering the study. The two met last month and agreed to use the results of the study to discuss improved oversight.

In a statement, the health authority said the confidentiality of grow site addresses is protected by law, but added it’s exploring ways to work more closely with law enforcement to ensure medical marijuana grow sites are operating legally.

“We are taking steps to maintain the integrity of Oregon’s medical marijuana program and make sure medical products reach the patients who need them,” Allen said. “The actions we’re taking include better tracking of growers, better enforcement, and making sure product that fails testing has been destroyed.”