A Novato man took a plea deal Friday for an indoor marijuana operation that got him beaten and robbed by three costumed women on Halloween.

David Murray Randolph, 46, pleaded guilty to marijuana possession and maintaining a site for drug production, said Deputy District Attorney Sean Kensinger. Both charges are misdemeanors.

Under the negotiated plea, Randolph will receive a 90-day jail sentence, but he can apply for home detention on a bracelet monitor. Felony cultivation charges were dismissed.

Randolph also forfeited all the marijuana seized by investigators, and agreed to let authorities search him or his property at any time without a warrant during his three-year probation period.

"Mr. Randolph is a good man who will focus on putting this situation behind him," said his defense attorney, Charles Dresow.

The case began last April, when the Marin County Major Crimes Task Force conducted a raid at Randolph's home in the 2400 block of Center Road in Novato. Investigators seized about 500 plants and two pounds of processed pot.

About six months later, while Randolph's marijuana case was still pending in court, he was attacked in a home invasion robbery on Halloween morning.

Randolph told police he was robbed by three women, one in a fairy princess costume, another wearing military camouflage and holding a handgun, the third dressed in a hood and a wig.

Randolph was struck by beer bottles, a metal lamp, a coffee mug and glass from a shattered bong, and he needed 22 stitches for a cut to his head, police said.

As part of the robbery investigation, detectives searched Randolph's home. They found another marijuana growing operation and seized the plants.

The robbery suspects were later identified as Randolph's ex-girlfriend, Keren Ann Blake; her daughter, Teresa Leanne Gollihugh; and an associate, Mollie Anna Blumberg.

Gollihugh later admitted to police that the venture was a plot to steal marijuana from Randolph, according to court documents.

Blumberg, 21, pleaded guilty this month to armed burglary. She was the suspect dressed as the fairy princess.

Blake, 39, and Gollihugh, 21, have pleaded not guilty. Blake allegedly wore the hood and wig. Gollihugh, a former Coast Guard member who was discharged after the incident, was the alleged gunwoman.