Pop US star Britney Spears lost custody of her two sons today after a wrenching and highly publicised court battle with ex-husband Kevin Federline.
Judge Scott Gordon ruled that Federline was to "retain physical custody" of the children on Wednesday until further order of the court," Judge Scott Gordon wrote in his court order.
Celebrity websites TMZ and X17 said Spears took her sons to the drive-through window of a fast food restaurant before handing them over to Federline's bodyguards ahead of time, shortly after noon on Monday.
The divorce between Spears, 25, and Federline, 29, became final at the end of July, but their temporary-shared custody arrangement for their sons has unravelled amid allegations from Federline's camp that Spears was an unfit mother.
Gordon on September 18 ordered Spears to undergo random drug testing in the latest twist in the bitter custody battle over Sean Preston, 2, and Jayden James, 1.
Her drug and alcohol testing was to be "conducted twice per week on random dates and times."
However, Monday's order said the transcript of proceedings was "sealed" and gave no details about what led the court to change custody.
TMZ quoted an unnamed source connected with the case as saying "she [Spears] may not have attended the parenting classes or performed the required drug and alcohol testing".
Earlier this month, a former Spears bodyguard had lodged a statement with the court making allegations of nudity and drug use, and expressing concern about the welfare of the pop singer's sons.
Reports have said Federline had been seeking a 70/30 arrangement in his favour instead of the 50/50 agreement the couple agreed to after separating.
Spears and Federline were to be "restrained from making derogatory remarks about the other party and the other party's family or significant other", an earlier court order said.
Gordon, who also ordered Spears to see a therapist at least once a week, is requiring her to hire a parenting "coach" and ordered the former couple to sign up for a Parenting Without Conflict program.
Spears filed for divorce last year from Federline, a former back-up dancer and aspiring rap singer, and has rarely been out of the tabloid headlines since - especially following her downward spiral that landed her in a rehabilitation centre in February.
Her stint in rehab followed a series of lurid tabloid headlines chronicling her erratic lifestyle.
She was repeatedly photographed in nightspots wearing no underwear, and was also captured bizarrely shaving her head in a hair salon and attacking a photographer's car with an umbrella.
She reportedly has had fallings out with both of her parents; media reports also speculated that she might suffer from post-partum depression or another psychiatric condition.
The loss of custody was the latest blow to Spears's image as she attempts to rebuild her sagging career ahead of the release in November of her first album in four years.
Just weeks ago, her management company terminated a barely month-old contract with her, following a heavily criticised public performance she gave at the MTV Video Music Awards in Las Vegas.
The talented dancer and performer stunned many at the show by appearing not to know all the moves to her own number, or all the words to her own song.
She shot to superstardom in late 1998, with her smash-hit debut album Baby One More Time which she followed with another chart-topping success the following year, Oops! ... I Did It Again.
Time magazine reports that Spears has sold more than 76 million records worldwide and her 31 million albums sold in the US make her the eighth best-selling female artist in US music history.