Chris Brown won temporary joint custody of his daughter Royalty last week after a bitter legal battle with the girl's mother Nia Guzman, as HNGN previously reported, but it could be revoked after the judge ordered the 26-year-old R&B singer to submit hair and urine samples for a drug test in court after Nia's lawyer insisted, according to sources close to Nia, TMZ reported.

Chris was granted joint custody of the child on the condition that Nia was present during his physical custody of the one-year-old and the child's parents are also required to attend mediation sessions in order to work out a long-term custody and support agreement, according to Mirror.

If they fail to come to an understanding, Royalty will spend four days with each parent until a trial is scheduled. The "Turn Up The Music" singer has been bonding with his daughter and shared some adorable pictures of their time together.