Actress Heather Locklear has been temporarily banned from possessing any guns after she allegedly threatened to shoot officers responding to a report of domestic violence at her home.

A judge on Tuesday ruled the former Dynasty star, 56, could not hold any firearms as part of her bail conditions after she was charged with battering sheriff’s officers.

Outside court, Ventura County Sheriff’s Office spokesman Sergeant Eric Buschow said the force is looking for a handgun registered to Locklear after she was arrested in her Thousand Oaks, California, home on the night of February 25.

“She said that if they (the officers) ever come back to the house that she would shoot them,” he said.

Locklear, also known for appearing in Melrose Place, faces up to five years in prison if found guilty, district attorney Thomas Dunlevy said.

She was arrested on suspicion of injuring a partner but was not charged with any domestic violence offences.

Instead, she was charged with four counts of battery on a sheriff’s officer and one count of obstructing an officer.

Overseeing the case at Ventura County Superior Court, commissioner Derek Malan agreed to Mr Dunlevy’s request to add the restriction to her bail conditions.

Defence lawyer William Haney had argued: “I don’t think my client has had a gun for many decades.”

According to the Los Angeles Times, Mr Buschow previously described her behaviour with officers as “extremely hostile” and at one point she became “combative”.

In 2008, she pleaded guilty to reckless driving after being arrested on suspicion of the more serious charge of driving under the influence of prescription drugs.

Locklear, who was previously married to Motley Crue drummer Tommy Lee and later Bon Jovi guitarist Richie Sambora, was released on a 20,000 dollar (£14,385) bail.

Her case was adjourned until April 13.