Britney Spears' ex-husband will be looking after their two children from now on after a row which ended up with the singer being taken to hospital.
Kevin Federline will be caring for Sean Preston, two, and one-year-old Jayden James, a court has decided.
The court ruled that Britney had no right to visit the children.
The row broke out with police officers when Britney refused to return the boys when they visited her on Thursday. She was later taken to hospital.
Britney was taken to hospital
Another court hearing will be held on 14 January.
Earlier, Kevin had been named the temporary full-time carer of the children, but Britney was still allowed to see them.
Meanwhile, Britney is still in hospital. It's not known what is wrong with her.
Britney and Kevin got married in September 2004, but were divorced in July 2007.