Pete Doherty pleaded guilty to a drug charge Tuesday after arriving so late the judge had issued an arrest warrant.
District Judge Davinder Lachhar warned Doherty that he had one last chance to avoid prison.
The 28-year-old rocker, who arrived in court at midday, also pleaded guilty to failing to appear on time without a reasonable excuse.
He admitted possessing quantities of crack cocaine, heroin, cannabis and ketamine as well as to two driving offenses on May 5.
Lachhar deferred sentence to Aug. 7 on condition that Doherty enter a detoxification program on July 16, as he said he was willing to do.
“If you go to this place to have detox and take advantage of it then we will see what sentence is appropriate when you next come, but if you do not I can tell you now that you will go into custody,” Lachhar told Doherty.
Doherty, lead singer of Babyshambles and boyfriend of supermodel Kate Moss, has been undergoing drug treatment under court order because of previous convictions.
His lawyer, Sean Curran, was summoned to court twice to explain Doherty’s whereabouts before the judge’s patience ran out.
“This is a court of law. He should have been here at 9:30 and he wasn’t so I am issuing a warrant with no bail,” Lachhar said.
Curran told the judge that Doherty had “a difficulty in his personal life which led to him being caught in this situation where he was driving the vehicle,” but didn’t elaborate.
The lawyer said it would be in Doherty’s best interest not to drive, but the judge interrupted: “I am more concerned about the danger to other members of the public on the road and to pedestrians.”