Chris Brown’s daughter, Royalty, holding the baby monkey | Instagram/chrisbrownofficial

Singer Chris Brown reached a deal with Los Angeles city prosecutors that is expected to spare him jail time for possessing a capuchin monkey without a permit.

Brown, 30, was charged last year with a pair of misdemeanor counts of possessing the monkey between Oct. 31, 2017, and Jan. 3, 2018, without a permit from the California Department of Fish and Wildlife.

In court Wednesday, Los Angeles Superior Court Commissioner H. Elizabeth Harris ordered Brown to enter a six-month formal diversion program, under which the charges will be dismissed if the singer does not violate the agreement by possessing any other non-permitted animals.

If he does commit any violations, he could face jail time and fines.

Brown was ordered to pay $35,000 to cover the cost of caring for the capuchin monkey, which has been placed in a specialized retreat for primates by the state Department of Fish and Wildlife. Brown’s attorney, Blair Berk, said Brown has already paid the $35,000.

Harris scheduled another court hearing for June 6, when the case is expected to be dismissed barring any further violations by Brown.

Authorities had obtained a search warrant for Brown’s home after several people reported he had the monkey — likely after he posted a picture of his young daughter, Royalty, holding the baby capuchin monkey on social media. But Brown voluntarily agreed to surrender the monkey he named Fiji, avoiding a raid.