Local law enforcement agencies got a holiday bonus Thursday when more than $1.2 million of assets seized in a 2006 marijuana bust in Hayward were distributed among five organizations to finance new technology and equipment.

The funds were handed out through the federal government's asset-forfeiture program, which seizes assets used in or bought with the profits of crime and redistributes the money to law enforcement agencies that helped bring down the criminals.

A federal investigation including five Bay Area law enforcement agencies found that Local Patients Cooperative, a medical marijuana dispensary in Hayward, was actually operating as a "sophisticated indoor grow" with hundreds of pounds of marijuana on hand even though their license only allowed three pounds of marijuana in the dispensary at one time, said Scott O'Briant, an agent with the Internal Revenue Service's criminal investigation unit.

Hayward, Livermore, Vallejo and South San Francisco police departments played a role in the investigation, as did the Southern Alameda County Narcotics Enforcement Team, which at the time included officers from Union City, Fremont and Newark. Drug Enforcement Administration and IRS agents were also involved.

Investigators seized more than $1.8 million from bank accounts and residences associated with the dispensary's owner and manager, Shon Squier and Valerie Herschel, both of Hayward. Squier and Herschel were both arrested and pleaded guilty to maintaining a drug-involved premise. Squier also pleaded guilty to one count of money laundering.

"This is one of the best parts of our job, when we can share the ill-gotten gains that are taken away from criminals with our law enforcement partners and local communities," O'Briant said.

Hayward police and the county drug unit each received $474,363 and Livermore, Vallejo and South San Francisco police departments each received $94,872. The fund distribution is based on the different groups' participation in the investigation. The IRS and DEA also take a portion of the funds.

Hayward Police Chief Diane Urban called the funds "a true holiday gift" at a time when police departments are facing budget cuts. Hayward police will probably use the money to purchase and update their technology, including electronic strength devices and body cameras, Urban said.

The asset-distribution program kicks in every time federal agencies seize funds and assets associated with a crime, though the funds to be distributed are rarely this large, asset-forfeiture coordinator Juan Saavedra said.