Britney Spears unveils loads of crazy stories in her new memoir, many of which went down in the mid-2000s … a tumultuous time when she lived in this Bev Hills mansion that became infamous the night she was committed.

Her spacious former pad is located in a gated community called The Summit, with the roughly 7,500-square-foot home even being considered “paparazzi-proof” because of how exclusive it is.

It’s got some sweet perks like a home theater, chef’s kitchen, saltwater swimming pool, jacuzzi and tons of backyard space.

Britney Spears and Kevin Federline

Britney moved into the bougie pad in 2007 — not long after filing for divorce from her ex, Kevin Federline — and she was still living here when she melted down in early 2008 and was placed on a mental health hold.

You’ll recall, an ambulance raced to the home and paramedics strapped Britney to a stretcher … removing her as photographers swarmed, and TV helicopters hovered above to get shots.

Brit was taken to Cedars-Sinai for treatment.

As we reported, she ended up selling the place in 2012 for $4,253,000 — more than $1 million above the original asking price. We were told she got multiple offers for the home, too.

Sources added she was getting out of there and moving in with her then-fiance, Jason Trawick.

Britney’s mansion sold again in 2021 — this time by “Million Dollar Listing Los Angeles” stars Josh and Matt Altman — when it went for $6.1M.

The luxurious Bev Hills spot already had a ton of Britney history, and now “The Woman in Me” is shedding even more light on its iconic past.