Former "Melrose Place" actor Heather Locklear pleaded no contest Friday to charges that she fought with sheriff's deputies and first responders during two visits to her Southern California home last year, the prosecutor said.

Locklear, 57, pleaded no contest to eight misdemeanor counts, including five counts of battery on a peace officer, one count of battery on emergency personnel and two counts of resisting, obstructing or delaying a peace officer, Ventura County District Attorney Gregory D. Totten said in a statement.

Locklear was sentenced to 120 days in jail, but it was stayed pending successful completion of a residential treatment program. Online court records indicate the 30-day program is to be completed in lieu of jail time.

Heather Locklear is seen in a police booking photo after her arrest on charges of suspicion of domestic battery and assaulting a peace officer on Feb. 25, 2018 in Ventura, California. Ventura County Sheriffs Office / via Getty Images file

The sentence also includes three years of probation, the district attorney said.

The first incident occurred in February 2018 when Ventura County sheriff's deputies responded to a domestic disturbance call at Locklear's home in Thousand Oaks.

The call involved a man described as a boyfriend who suffered a physical injury, and Locklear allegedly kicked and pushed deputies, The Associated Press reported. The man declined medical treatment.

Another domestic call four months later was part of the case resolved Friday.

Locklear's criminal defense attorney said he had no comment and deferred to the actor's personal attorney. A message to that attorney was not immediately returned Friday evening.

A plea of no contest is not a guilty plea, but it results in a conviction.

Thousand Oaks is a city of 126,000 in Ventura County, west of Los Angeles.