Britney Spears didn’t shave her head in a fit of rage — she did it so there would be no way to trace her drug use, a lawyer for her former manager claimed in court.

Joseph Schleimer opened Sam Lutfi’s libel case against Spears’ parents and conservators by showing dramatic photos of the pop superstar with a shaved head and striking an SUV with an umbrella.

Schleimer suggested to the LA jury that Spears was afraid a judge would order a test of her hair.

If drugs were found, the judge could take away her two sons and give custody to ex-husband Kevin Federline.

Schleimer claimed Lutfi tried to save the meth-addled Spears from a mental breakdown but lost control — and was blamed for her being hospitalized and placed under a court-ordered conservator.

“My client was made a scapegoat for drug abuse and erratic behavior of Britney Spears,” Schleimer said in his opening remarks Thursday.

During a break when the jury was not present, Superior Court Judge Suzanne Bruguera warned Schleimer that his bold claims had to be supported by evidence.

“You can’t waste time on statements just thrown in the air,” the judge said at another point.

Schleimer said he would prove them through either “testimony or documentary evidence.”

He told the jury that one of the first things he did when he was hired as Spears’ manager was to have drug-sniffing dogs scour her hilltop home — and they found crystal meth in a trap door.

Schleimer also claimed Spears took “all or most” of 30 prescription amphetamine pills during a 36-hour period in January 2008 and then locked herself in her bathroom. The freakout ended with her being hospitalized.

“She liked to use amphetamines, speed or uppers . . . and most of the things that went wrong were related to that drug,” he said.

Spears almost certainly won’t testify because she remains under a conservatorship overseen by a judge who has ordered her not to appear for trial or a deposition.

But Spears’ parents, Jamie and Lynne, both sat in the audience.

Yesterday, a lawyer for Jamie told jurors his client went to heroic lengths to save Britney from drug addiction and mental illness.

Lutfi agreed to work for Spears in July 2007 for 15 percent of her earnings — but only if she stayed away from drugs, his lawyer said.

The court case is the culmination of a long-running battle between Lutfi and Spears’ parents.

He is seeking millions of dollars from Spears and her family, claiming her mother’s 2008 book, “Through the Storm: A Real Story of Fame and Family in a Tabloid World,” lied about him drugging and isolating the pop star.

He is also seeking a portion of the singer’s profits, claiming he was a key player in her 2007 album “Blackout.”

With AP