4:34 PM PT -- We spoke with Britney's attorney, Mathew Rosengart, after the hearing who says he's pleased with how seriously the court is taking the case ... and hopes the harsh punishment will deter any future copycats from trying the same.
Britney Spears' ex, Jason Alexander, cannot contact or bother the singer in any capacity for at least the next 3 years, a judge just issued a restraining order against Britney's ex-husband ... and also hit him with a felony stalking charge.
Alexander pled not guilty at his arraignment Monday on charges stemming from last week's wild incident -- in which he filmed himself sneaking onto the Ventura-area compound where she was set to get hitched ... only to be detained following a scuffle with security/law enforcement.
The judge also added a felony stalking charge to Alexander's case and set his bail at $100,000 ... and he'll have to surrender any firearms he may have in his possession.
As we reported, cops say JA was armed with a knife during the episode, and an emergency protective order was issued on Britney's behalf -- ordering him to steer clear of her and Sam.
He was booked for trespassing, vandalism and battery, for which he could possibly enter a plea Monday. And, he still has another case against him from Northern California ... where he's alleged to have committed grand theft.
In that case ... a woman claims he jacked a pricey bracelet of hers while crashing at her pad in 2015, listed as being worth $2,000. The Napa County Sheriff's Office issued a warrant for Alexander's arrest shortly thereafter in 2016 -- but he's dodged it thus far, it seems.
After he was arrested at the wedding, the warrant popped up. So, he has to deal with that too. Unclear how the cases might be presented order-wise, but both are on the table.