Alexander was chased and detained by security after showing up at the California residence, a law enforcement official said.

LOS ANGELES — Britney Spears' ex-husband Jason Alexander was arrested Thursday at the Ventura County home the pop star shares with fiancé Sam Asghari.

Alexander who was married to Spears for 55 hours after a 2004 Las Vegas wedding before the marriage was annulled, was chased and detained by security after showing up at the residence, a Ventura County Sheriff's Department spokesman said.

The sheriff's department was called to Spears’ residence in Thousand Oaks around 2 p.m. about a trespasser, the spokesman said.

Alexander, 40, was initially arrested on suspicion of an outstanding felony warrant out of Napa County from 2016, the official said.

He was subsequently arrested on suspicion of misdemeanor battery, vandalism and trespassing in Ventura County, he said.

An emergency protective order was issued late Thursday requiring him to stay away from Spears, the spokesman said.