SANTA ANA, Calif. – A Southern California judge accused of killing his wife during an argument while drunk texted his court clerk and bailiff afterward to say he had shot her, prosecutors said Friday as they charged him with murder.

A court filing from prosecutors says Orange County Superior Court Judge Jeffrey Ferguson texted minutes after last week’s killing: “I just lost it. I just shot my wife. I won’t be in tomorrow. I will be in custody. I’m so sorry.”

Ferguson is free on $1 million bail. But prosecutors said they’re seeking new bail conditions to protect public safety and ensure he doesn’t flee after authorities found 47 weapons, including the pistol used in the shooting, and more than 26,000 rounds of ammunition at his Anaheim home. The weapons are legally owned but a rifle registered in his name is still missing, they said.

The shooting happened after Ferguson and his wife, Sheryl Ferguson, were arguing at a restaurant on Aug. 3, the Orange County district attorney’s office said in the court filing. The argument continued after the couple returned to their home in the upscale neighborhood of Anaheim Hills. The court document says the wife said something to the effect of “why don’t you point a real gun at me?” and he pulled a pistol from his ankle holster and shot her in the chest.

Their adult son called 911 and said his father had been drinking too much and shot his mom, the document says.

The Perseid meteor shower:A visual guide on where, when and how to see it

Jeffrey Ferguson also called 911 to vaguely report the shooting. When asked if he shot his wife, he said he didn’t want to talk about it at that time and she needed paramedics.

When officers arrived, Ferguson smelled of alcohol and told them, “Oh man I can’t believe I did this,” according to the document.