Congress defunded Department of Justice investigations into medical-marijuana sales. This report previously stated the same protection had been provided to legal recreational sales. The story has been updated.

Federal prosecutors have launched a probe of cannabis companies in California, seeking a batch of records held by a startup that functions as a Yelp for marijuana dispensaries, according to a grand-jury subpoena reviewed by MarketWatch.

Criminal prosecutors in the U.S. attorney’s office for the Eastern District of California ordered the production of records from Ghost Management Group LLC, which owns a subsidiary called Weedmaps that provides an online directory of cannabis retailers. Weedmaps’ online services allow pot consumers to rate and compare stores, find deals and place orders for delivery.

The subpoena covers documents related to cannabis businesses listed on Weedmaps, and records related to its ordering service. The government also sought documents and other records kept by Weedmaps related to its own staff, investors and accounting, according to the subpoena issued late last year.

A spokeswoman for the Eastern District of California declined to comment.

In an emailed statement, a Weedmaps spokesman said, “Given our role as the largest technology company in the cannabis sector, from time to time, Weedmaps receives requests for information from government agencies. We cooperate with these requests as we do with all lawful inquiries. Our corporate policy is not to comment to the media about any specific legal matters or inquiries with respect to the company or any of its customers.”

The investigation’s focus was not immediately clear, according to several lawyers and two former federal prosecutors who reviewed the subpoena. One former U.S. attorney said the document is “thorough,” likely represents the early stages of the probe, and that an important component of the document request concerns a set of records that were related to the company’s services which facilitate buying marijuana over the internet.

Included in the demand for records are those related to communications and payments to local, state and federal employees, as well as elected officials and any candidates for those offices.

Among the companies prosecutors sought documents about in the subpoena was Terra Tech Corp. TRTC, -5.58% , which changed its name to Onyx Group Holdings after a recent merger. CannaCraft, one of California’s largest distributors, was also among the 30 companies about which prosecutors sought records. CannaCraft produces a weed drink in partnership with Lagunitas Brewing Co., which is a subsidiary of Heineken N.V. HEIA, +0.84% HEINY, +1.31% .

Terra Tech and CannaCraft did not respond to requests for comment. CannaCraft holds a manufacturing license and Terra Tech, through a subsidiary, has a retail license.

Don’t miss:People want cheap weed, and Aurora Cannabis is paying the price

Dated Sept. 19, the document appears to be an attempt to determine whether a group of companies, including Weedmaps, has complied with California state cannabis regulations, according to civil-rights lawyer Matt Kumin.

“To successfully prosecute a company under federal law, federal prosecutors must show the cannabis entity is not in compliance with California regulations,” Kumin told MarketWatch.

Federal laws prohibit the sale and possession of marijuana, but Congress has choked off Justice Department funding for pursuing marijuana cases if the targets comply with states’ medical-marijuana regulations.

“This fits what happened in Colorado shortly after legalization,” Kumin said. “The feds came in and made a point of going after companies that appeared to be violating state regulations in fundamental ways.”

Sales of regulated recreational cannabis in California began officially in 2018, but the illicit market continues to capture as much as 70% of retail sales, according to research from Canaccord Genuity.

Read:Pot companies have just months to live on average, study finds

State-illegal cannabis businesses have caused havoc for legal operators, taking advantage of licenses to siphon pot into the illegal market and grossly undercutting pricing, PI Financial analyst Jason Zandberg told MarketWatch in a phone interview. An investigation by a U.S. attorney’s office in California could be an important development because of the federal government’s largely hands-off approach to state marijuana regulations so far, he said.

“I think it just brings more weight to the downside risk to these illicit operators,” Zandberg said. “Illegal businesses will no longer be able to operate with impunity.”

Weedmaps has faced scrutiny from California regulators in the past because it listed dispensaries that did not follow state rules. The company has said it will require all new listings to include a state license number and insist that existing listings add license information to their accounts by the end of 2019. The subpoena includes a demand to produce records related to Weedmaps’ statement that it would stop advertising unlicensed cannabis activity and customer records.

Beyond the focus on Weedmaps and dozens of state businesses, prosecutors also demanded that Weedmaps produce records related to agricultural chemicals and pesticides such as pyrethrins and hyroxycarbouran.

U.S. Attorney McGregor Scott of California’s Eastern District has previously said that the office planned to make eradicating and prosecuting illegal growing sites, which often use toxins without permission, an enforcement priority. Scott’s office has also taken an aggressive approach to enforcing cannabis laws to the extent it can given the federally imposed restrictions.

The subpoena ordered a representative of the company to appear before a grand jury on Oct. 31, 2019, and bring the relevant records.

Don’t miss:All of MarketWatch’s latest cannabis coverage