Britney Spears previously "struggled with drug abuse" and ended up sleeping in a parking lot.

Britney Spears

Britney Spears

The 'Toxic' hitmaker is preparing for a legal battle against her former friend and manager Sam Lutfi and documents submitted by her team in a motion to keep him out of the room when she makes her deposition include a 2015 Court of Appeals decision which chronicled the history between the pair.

Documents seen by TMZ state Britney met Sam in 2007 at a time when her life was in turmoil as she was embroiled in her divorce from Kevin Federline, a custody battle over their sons, Preston, 10, and Jaden, nine, and was estranged from her parents.

The judges also stated: "In addition, she was struggling with drug abuse."

According to the documents, Sam advised the 34-year-old pop star about "the importance of getting clean,", but Britney's family claim he is the one who supplied her with drugs.

The papers further state the 'Gimme More' singer asked Sam to manage her and he accepted on two conditions; that she would let him assemble a team, and stop abusing drugs. He also insisted on being able to use drug sniffer dogs to make sure she stayed sober.

Despite Britney's promises to get clean, the judges say she continued to use drugs and the situation got so dire, she ended up sleeping in a parking lot on the day she lost custody of her sons.

After losing her children in early 2008, Britney was admitted to a psychiatric ward on an involuntary hold. She was then placed under the conservatorship of her father Jamie Spears and attorney Andrew Wallet and since then, has worked hard to return to health and get her career back on track.