NEW YORK — An impending auction of pop star Madonna's personal items, including a love letter from her ex-boyfriend the late rapper Tupac Shakur, a pair of previously worn undergarments and a hairbrush containing her hair, was halted by a judge on Tuesday.

Manhattan state Supreme Court Judge Gerald Leibovitz ordered Gotta Have It! Collectibles to pull 22 items from its rock-and-roll-themed auction scheduled for Wednesday.

The Material Girl had earlier sought an emergency court order saying she was "shocked to learn" of the planned online auction of the Tupac letter and had no idea it was no longer in her possession.

"The fact that I have attained celebrity status as a result of success in my career does not obviate my right to maintain my privacy, including with regard to highly personal items," Madonna said in court papers. "I understand that my DNA could be extracted from a piece of my hair. It is outrageous and grossly offensive that my DNA could be auctioned for sale to the general public."

Court papers said the Tupac letter was expected to fetch up to $400,000. Tupac, one of the best-selling rappers of all time, dated Madonna in the early 1990s and died of injuries suffered in a Las Vegas drive-by shooting in 1996.

Madonna, behind such hit songs as "Like a Virgin" and "Vogue," has sold hundreds of millions of albums. Other Madonna items scheduled to be auctioned were private photographs taken at a bachelorette party at her Miami home, personal letters and cassette tapes of unreleased recordings.

Madonna's court papers name Darlene Lutz, a former friend, art consultant and "frequent overnight guest" in Madonna's home when she was "not in residence," as behind the sale of the property.

A spokesman for Lutz and the auction house said the allegations will be "vigorously challenged and refuted" in court.

"Madonna and her legal army have taken what we believe to be completely baseless and meritless action to temporarily halt the sale of Ms. Lutz's legal property," spokesman Pete Siegel told the New York Post. "We are confident that the Madonna memorabilia will be back."