Sales of medical marijuana spiked more than 20% nationwide last week to an all-time high, analysts said, as patients flocked to dispensaries fearing that they would not be able to buy their cannabis in the event of a lockdown.

Medical marijuana dispensaries in Pennsylvania and New Jersey are considered “essential businesses,” akin to pharmacies, and are not required to close.

“On March 11, when major news of the potential impact of COVID-19 indicated changes in lifestyle, buying patterns were at normal rates," said Ostap Rapeyko, a business intelligence analyst with Akerna. "However, a week later, on March 18, sales increased by 19.2% overall.”

Akerna is the parent company of MJ Freeway, which provides sale-tracing software to the marijuana industry. According to Rapeyko, medical cannabis sales were up 20.8% and recreational adult-use sales were up 11.6%. Sales of flower, the smokable form of cannabis, rose 22.6%. Vapes — still reeling from bad publicity earlier this year -- were up 9.7% while edibles were up 12.4%

In Akerna’s flash report, spokesperson D. Nikki Wheeler said demand for legal weed was at “an all-time high.”

Chris Goldstein, a South Jersey organizer for NORML, the National Organization for the Reform of Marijuana Laws, said the “traditional market,” a.k.a. the underground marijuana economy, was “sustaining patients robustly” and had also seen a spike in sales.

Unlike state-licensed marijuana dispensaries, many traditional dealers accept electronic forms of payment such as Paypal and Venmo, Goldstein said. In addition, those illegal dealers often make home deliveries.

Given the lines at dispensaries reported throughout the region, Pennsylvania and New Jersey are considering relaxing regulations to allow for legal home deliveries or curbside pickup from dispensaries.

In Bellmawr, N.J., on Tuesday, municipal police said more than 100 card-carrying patients were already in line at 6 a.m. at the Curaleaf dispensary. The queue later grew to 200 people and snaked around the building, said Chief William Walsh. Some of those customers -- including cancer patients -- waited three hours to pick up their medications.

“They were hit unexpectedly,” Walsh said. “People were parking wherever they could and not always legally.”

Walsh said his officers arrested two brothers who got to the line too late.

“The dispensary said they weren’t going to take any more patients that night. The brothers threatened they would kill themselves if they couldn’t buy their marijuana and yelled profanities,” Walsh said. “They were charged with disorderly conduct.”

A Curaleaf spokesperson said the dispensary chain was putting in additional measures for line control to minimize contact and enforce social distancing.

“We are also encouraging delivery, mobile ordering, express pickup, and curbside delivery in the states where those options are available,” said Curaleaf’s Tracy Brady. Delivery, express pickup, and curbside delivery are not yet available in Pennsylvania and New Jersey.