It was six hours past midnight, but the crowd inside the Berkeley Patients Group counted down the seconds.

“Happy new year,” they yelled at precisely 6 a.m. Monday as a cashier rang up the cost of three joints, a $45.37 purchase representing one of the first recreational marijuana sales in the state.

The moment marked the beginning of a new industry in California, one that’s heavily regulated and taxed, with revenue reaching several billion dollars per year.

The day has been long anticipated by cannabis advocates who pushed for voters to pass Proposition 64 in November 2016, largely decriminalizing marijuana and allowing for the commercial sale of products to adults 21 or older.

Earlier, Berkeley Mayor Jesse Arreguin and Democratic state Sen. Nancy Skinner joined a couple of dozen people outside the Berkeley Patients Group waiting for the first sales.

“I’m stoked about this historic moment, not just for Berkeley, but for the state of California.” Arreguin said. “This is a long time coming.”

The first buyers were Chris Conrad and Mikki Norris, longtime marijuana advocates who purchased the three joints as the crowd cheered.

The couple had worked on the marijuana effort for more than two decades, pushed by their belief that its legalization is an issue that expands to social justice, civil rights and health care.

“When we started, George Bush the first was president,” Norris, 65, said. “Zero tolerance was the policy of this country.”

“We waited a long time for this” Conrad, 64, said.

More for you News Some states put a THC limit on pot-smoking drivers -...

The handful of shops making recreational sales Monday acquired both local and state licenses. They included Harborside, Purple Heart and Blum in Oakland; Berkeley Patients Group and Cannabis Buyers Club of Berkeley; 7 Stars Holistic Healing Center in Richmond; Mercy Wellness in Cotati; and Sparc and Solful in Sebastopol. Statewide, more than 400 shops have licenses to sell commercial cannabis.

Dale Gieringer, director of California Norml, a cannabis advocacy group, postponed a winter vacation by one day to see legal sales commence.

“This marks the welcome end of a century of prohibition —104 years to be accurate,” he said after watching the first sales at Harborside. “It’s wonderful that people aren’t being imprisoned for marijuana the way they used to be.”

At Purple Heart dispensary in Oakland, Keith Stephenson, chief executive and founder, watched a diverse array of people stream through the doors, including a well-coiffed senior citizen in a bright green windbreaker who was just ahead of a 20-something man in workout gear and a bike helmet.

In the 11 years he’s operated the dispensary, Stephenson has referred to the buyers as patients and had to correct himself a few times Monday morning as he got used to calling them “customers.” He recalled all the years he went to work wondering if he would get arrested for selling marijuana.

“This was the only job you could go to work and go to jail the same day,” he said.

But on Monday, Stephenson noted he’s added four cash registers and is remodeling the interior of his business.

Cannabis is “bringing industry to Oakland, it’s bringing jobs, it’s bringing tourism,” he said. “It’s an epic day.”

Stephenson predicted that California’s cannabis industry would reflect that state’s tastes, offering buyers artisanal products akin to cold-pressed olive oil or individualized drip coffee.

“We’re willing to pay for quality,” he said. “We are epicureans.”

While Oakland and Berkeley were among the first to authorize recreational marijuana, additional locations are expected to open in coming days and weeks, including outlets in San Francisco, where in-fighting among the city’s supervisors stalled recreational permits until Jan. 6.

But many parts of the state are expected to bar the sales altogether, including Marin and San Mateo counties and the city of Walnut Creek.

At some shops, the coming-out party featured live music, coffee and doughnuts, prizes for those first in line and speeches from supportive local politicians — a far cry from the days when the cannabis trade operated in the shadows.

“I feel like it’s been a struggle and a fight,” said Nicole Rice, 28, who was among the first in line at the Berkeley Patients Group, adding that it took years and voter persistence to pass the law. “It’s historic.”

Marijuana remains illegal by federal law. But several states, including Washington, Oregon, Colorado, Nevada and now California, have legalized both medicinal and recreational use.

Since November 2016, California law has allowed adults 21 or older to possess and transport up to 1 ounce of cannabis flower, as well as up to 8 grams of extract or infused foods. Smoking in public is still prohibited.

Medical marijuana will continue to be available through existing dispensaries to those with a valid ID and a doctor’s recommendation. But as of Monday morning, all customers buying cannabis products will pay a 15 percent state excise tax, which is expected to eventually bring in $1 billion or more a year for marijuana research, addiction prevention and boosted law enforcement, among other things.

Recreational customers must pay sales tax as well, unlike those with a state-authorized medical identification card. In addition, cities can choose to impose local cannabis taxes.

In Oakland, taxes for most customers will increase from 14.25 percent to 34.25 percent, according to Harborside officials.

Long lines of customers were willing to pay up Monday.

Anthony Moraga spent $120 on 3.5 grams of top-shelf buds, and another $32 in taxes, at Berkeley Patients Group.

“It’s the first time we can come out in public,” he said, “paying taxes on our legal purchase.”

S.F. Chronicle staff writers

Jenna Lyons and Rachel Swan contributed to this report.

Jill Tucker and David Downs are San Francisco Chronicle staff writers. Email: jtucker@sfchronicle.com, ddowns@sfchronicle.com Twitter: @JillTucker, @davidrdowns