(CNN) -- A court has ordered pop singer Britney Spears to give up custody of her children effective Wednesday at noon.
Spears' former husband, Kevin Federline, is to retain custody of the two children "until further order of the court," according to an order issued by Los Angeles County Superior Court Judge Scott M. Gordon.
Spears, 25, and Federline, 29, have two children: Sean Preston, 2, and Jayden James, 1. Spears and Federline were divorced in July after two years of marriage.
On September 18, Spears was ordered to submit to random drug tests after the court found she engaged in "habitual, frequent, and continuous use of controlled substances and alcohol."
Spears was also ordered to spend eight hours a week working with a parenting coach to observe her interactions with her children.