A boy who urinated in a US car park has been given three months’ probation and must write an essay on the late NBA legend Kobe Bryant.
Quantavious Eason, 10, was arrested in Mississippi after police caught him relieving himself behind his mother’s car while she was at a lawyer’s office.
A lawyer for the family of the boy – who is black – claimed he would not have been prosecuted if he was white.
“I thought any sensible judge would dismiss the charge completely,” said lawyer Carlos Moore.
His request to get the case thrown out was denied and the prosecution threatened to upgrade the charges if he took it to trial.
Mr Moore said he couldn’t find a case of a child getting a similar sentence for the same offence.
“I don’t think there is a male in America who has not discreetly urinated in public,” the lawyer added.
“He urinated next to the car behind the door – not exposing himself to anyone,” he told Sky’s US partner, NBC News.
“He would not have been arrested, prosecuted or sentenced if he was any other colour, race, besides black.”
Prosecutors initially wanted Quantavious to write an essay about public decency, said Mr Moore, but the judge changed it to a piece on Bryant because the youngster likes basketball.
Judge Rusty Harlow handed down the sentence on Tuesday at Tate County’s youth court.
The boy’s arrest happened in Senatobia, Mississippi, on 10 August.
Police chief Richard Chandler said he wasn’t handcuffed, but the child’s mother Latonya Eason said he was put in a cell.
Ms Eason said the sentence wasn’t fair.
“The average child would use the bathroom outside… and probably some grown men that would do the same thing,” she said.
Police said the officers had violated training on how to deal with children – and one was “no longer employed”, while the others would be disciplined.
The head of civil rights organisation Colour Of Change said the decision to charge didn’t make sense.
“Nothing about this case from the decisions by the police, the prosecutor, and the judge makes us safer or is a good use of taxpayer resources,” said Rashad Robinson.
He said Mississippi and other states had a history of a “two-tiered justice system” – one for black children and one for white.
The boy must now check in with a probation officer once a month but won’t get a criminal record.