Just days after a fired employee fatally shot his supervisors at the Ford Store Morgan Hill this June, an eerily similar threat emerged at the automaker’s Sunnyvale dealership: A mechanic about to lose his job for drunkenness had recently threatened to kill a supervisor and brought guns to work.

The owner of the Sunnyvale dealership called police, but there was not enough evidence to charge the fired worker with making criminal threats. So authorities turned to California’s “red flag” law, getting a court order that allowed them to temporarily take away the 54-year-old mechanic’s cache of seven rifles, three shotguns, four handguns and high-capacity ammunition magazines.

“It’s a very effective tool in preventing acts of violence involving firearms,” said Sunnyvale Department of Public Safety Chief Phan S. Ngo. “Potentially we prevented somebody from going and doing major damage with his arsenal, and I’d rather go this route of prevention than responding to a mass shooting incident.”

It was among several recent Bay Area cases in which police used California’s gun violence restraining order law to temporarily disarm allegedly threatening employees or lovers and others reported to be delusional or suicidal.

Among other examples this year: A fired Netflix security contractor in July who allegedly threatened to use his guns to take revenge at the Los Gatos company, and a Palo Alto city employee who in April menacingly likened her “continued mistreatment” to that of a 1988 workplace shooter.

In the East Bay, cases included a man whose psychiatrist called Hayward police in July concerned the patient was hearing voices and had guns, prompting authorities to seize a rifle and pistol from him last month. And Pleasanton police in August seized firearms from a woman after her husband called to report she suffered from mental health issues, had recently purchased a lot of guns, and made a suicidal gesture with one of them.

Passed in 2014, California’s red flag law lets a judge authorize law enforcement to take a person’s guns if police or a family member cite reasonable grounds that the owner poses a significant danger in the near future and that alternative measures are inadequate. Police can confiscate the weapons for three weeks before a hearing, after which the judge can extend the removal order for up to a year.

California’s law was prompted by a violent rampage that year in Isla Vista, near UC Santa Barbara, in which a 22-year-old stabbed three men to death in his apartment and fatally shot two women and a man at random before taking his life as police closed in. Just weeks before the attack, the gunman’s parents had alerted police to his alarming behavior and video posts, but officers had decided the situation did not warrant a psychiatric detention.

In the wake of recent massacres — including mass shootings in Gilroy, Dayton, Ohio, El Paso, and Odessa, Texas — Congress is expected to consider a national red flag or extreme risk protection order law like those in California and 16 other states.

Last month, the first academic research on the law since its passage found 21 cases across the state in which gun violence restraining orders appeared to have prevented threatened mass shootings.

The National Rifle Association opposes a national red flag law and those in states like California, Oregon and Vermont, calling them “confiscation schemes” that “do not protect due process rights.” The gun lobbying group has said it could support state laws that allow authorities to seize guns only after the owner gets a hearing before a judge. State laws have various requirements for how long guns may be taken before the owner has a chance to contest the seizure in court — the three weeks allowed in California and Oregon being the longest.

Advocates of such laws say they are needed for situations in which there is an imminent threat, but not enough information to warrant an arrest or a mental health hold.

“You’re in a scary situation — ‘What am I going to do with this? I’m not sure he’s broken the law, can we get his gun?'” said Santa Clara County Deputy District Attorney Marisa McKeown, who has urged local police to consider gun violence restraining orders where appropriate.

“It takes a champion,” McKeown said. “So many of our gun laws are misunderstood and under-used.”

Figures compiled by the California Attorney General’s Office show the red flag law was used with growing frequency between 2016, when the law took effect, and 2018, though some counties have utilized it more than others. In the Bay Area, Santa Clara County had the most red flag cases — 42 — during those years, compared with 10 each in Alameda and Contra Costa counties, 5 in Marin County, and one in San Francisco. San Mateo County had none.

Statewide, San Diego County had by far the greatest use of the red flag orders, with more than 200 issued by 2018, the last year for which figures were available.

Recent Bay Area cases in which authorities obtained gun violence orders suggest they may have headed off at least three potentially horrific threatened massacres — and possibly more. Though court records identify the subject of red flag orders, this news organization is only naming those individuals whose cases also led to criminal charges.

On July 9, a company providing security to the Netflix campus in Los Gatos called police to report a disturbing development. A 40-year-old guard fired for repeatedly dozing off on the job made menacing statements like “I’ve got guns,” “I’m not going down easy” and “I’m going to take you and the organization down” in repeated phone calls and text messages to his manager.

Los Gatos police saw the guard, Edris Niakian, had guns registered to him and obtained a court order to seize a .30-06 rifle, a .22-caliber rifle, a 9mm pistol, crossbow, pellet guns and ammunition. In court papers, they said he initially denied making threats. After being told some of them were recorded and preserved, the man said he meant no harm and just wanted to ruin his boss’s day by stressing him out.

Police urged a judge to extend the weapons confiscation for a year, arguing Niakian “has intimate knowledge of the campus’s security vulnerabilities” and arguing he poses “an imminent and grave threat.” Niakian, who was also charged with making criminal threats, wrote in a response to the court that he has been a law-abiding citizen and never before been accused of inappropriate use of his guns. He asked the court to put off a hearing on the gun seizure to first resolve the pending felony charges, for which he is scheduled to enter a plea Sept. 23.

In an interview, Niakian disputed the police assertion that he threatened any harm to his co-workers or others at the Netflix campus.

“I didn’t do anything, I didn’t intend anything,” Niakian said. “I might have lost my temper and said things I shouldn’t have, but sometimes you’re angry and say things you don’t mean. That’s basically what happened in my case, I said something I didn’t mean because I felt I was being mistreated and let go of a job without any due process.”

In Palo Alto, police obtained an order on May 7 to seize guns from a city employee who had made menacing statements referencing a 1988 mass shooting to a human resources administrator. “Perhaps HR should consider the much worse implications of my continued mistreatment,” the 49-year-old Palo Alto employee wrote in a letter to the personnel department. She admitted she had a .357 magnum revolver at her San Jose home as well as a .308-caliber rifle and pump-action shotgun at a home in the state of Washington.

Though court records did not specify the event mentioned, among the gun massacres that year was a shooting at Sunnyvale technology company ESL in which a disgruntled former employee obsessed with a co-worker killed seven people.

According to court papers, after being served the red flag order, the Palo Alto woman gave the revolver to a gun dealer and arranged to have it sent to her Washington home. Police said they were able to block that transfer and that the woman became enraged at having her weapons confiscated. The woman, who worked as a utilities locator, no longer works for the city and has not been criminally charged. In June, a judge extended the seizure for a year, to June 24, 2020.

Though California’s law was the country’s first to allow family members as well as police to petition for a gun violence restraining order — and a pending state bill would allow co-workers and school employees to petition as well — the vast majority of the orders obtained in recent years have come from police, often acting on behalf of concerned family, school officials or co-workers.

Attorney general records indicated only one Bay Area case, in Contra Costa County in 2016, in which family members petitioned for a gun violence restraining order.

Still, opponents say gun-seizure laws raise concerns that owners could be subject to a confiscation order simply because someone they had an argument with reported them to police as a threat.

“Disagreeing with someone shouldn’t be grounds having your guns taken away, no matter how boisterous or vigorous the discussion was,” said San Jose lawyer Donald Kilmer. “That’s the fear in the gun owner community.”

Kilmer was unaware of any specific local cases of overreach involving gun violence restraining orders but is representing a woman who sued San Jose for refusing to return a dozen guns she and her husband owned after he had a mental breakdown and she called police in 2013. The Ninth Circuit U.S. Court of Appeals sided with the city in that case earlier this year.

In most instances, McKeown said, the gun violence restraining orders become part of broader criminal cases and the weapons remain in police custody as evidence — a felony conviction would prohibit the person from possessing guns. McKeown said that in cases where guns are ordered removed temporarily out of concern about the owner’s mental state, police typically try to persuade the owner and family members to voluntarily relinquish them.

The restraining orders are temporary, and judges don’t always agree to extend them — a fact McKeown cited in arguing that there is due process for gun owners.

“There is an actual inquiry where the court is making individualized findings of the propriety,” she said.

Mountain View police in February obtained an order to take five handguns and a rifle from a 71-year-old man who reportedly believed backyard planter boxes were prowlers and whose sisters and niece feared he might shoot someone. He willingly surrendered the weapons, but after a May hearing, a judge ordered them returned. The man was not criminally charged.

Related Articles How Jesús Luzardo connected with family of victim of Florida school shooting through cardboard cutout

Federal judge upholds California ban on carrying guns in public Last year, Los Altos police seized a .45-caliber pistol from a 41-year-old man whose parents told police he was off his medication, acting erratically and had indicated he would use the gun to “take care of” acquaintances in Antioch who he said were causing him problems. The officer who responded described the man as agitated and aggressive when she refused to allow him access to his guns.

The man, who was not criminally charged, said in a court filing that it was his parents who suffered from mental health problems and that it was a misunderstanding. The parents signed statements to that effect, and a judge in July 2018 allowed the seizure order to expire, citing lack of sufficient evidence to extend it.

In Sunnyvale, the mechanic accused of making the threats at the Ford dealership denied he had brought guns to work or threatened co-workers, and was “upset and frustrated but remained cooperative” when police came to his home June 28 to take his guns. An August hearing on whether to extend the gun violence restraining order was rescheduled for Monday, Sept. 16.

Meanwhile, the gun prohibition order on Niakian remains in effect at least until February, Los Gatos city attorney Lynne Lapros said.

“It doesn’t permanently restrain the person,” she added. “It’s just a cool down, kind of a time-out.”

Staff Writer Angela Ruggiero contributed to this report.