The case against a 10-year-old boy taken to court over alleged racist taunts has been dropped by the Crown Prosecution Service (CPS).
District Judge Jonathan Finestein had branded the decision to bring the youngster to Salford Youth Court "political correctness gone mad".
Greater Manchester Police stood by their decision and Mr Finestein was criticised for being "out of date".
The CPS said that the 10-year-old boy had accepted a formal warning.
The boy, from Irlam, Greater Manchester, was accused of racially abusing an 11-year-old fellow pupil and appeared in court earlier this month.
Judge Finestein adjourned the case, saying the boys would have got "a good clouting" in his day.
He had asked prosecutors to reconsider whether the case was in the public interest, but was later criticised by the National Union of Teachers for not taking the abuse seriously enough.
A spokeswoman for the CPS said on Wednesday that the Chief Crown Prosecutor for Greater Manchester, John Holt, had now decided not to continue the prosecution, adding that the boy had been given a warning.
The case centred on an incident in January in which the 11-year-old Asian boy suffered a bruised leg.
An 11-year-old boy originally arrested over the incident was reprimanded for section 39 assault, while a 10-year-old boy was given a warning.
But a second 10-year-old boy refused a warning and was summonsed to court, accused of a racially aggravated public order offence.
Mr Holt added: "Mr Finestein made remarks about the decision to prosecute which were highly critical of the CPS.
"He was not aware of the full history of the matter, in particular the prior disposal of the allegations against the other two boys.
"He has accepted that he may well have been less forthright in his comments if he had been aware.
"In my review I have taken into account the fact the other two boys, who had a greater involvement, have accepted a reprimand and a final warning over their behaviour.
"As the third boy has now been given the warning about his conduct, we feel that this matter is now closed."
Greater Manchester Police said that Chief Constable Michael Todd had received a letter from Mr Finestein expressing "regret" about his criticisms of the police in court.
Chris Keates, general secretary of the NASUWT teachers' union, argued that allegations of sustained racial taunting merited serious action.
"It is extremely disturbing that a 10-year-old boy had to be referred to a court of law for alleged racial abuse," he said.
"Cases involving pupils of this age, which escalate to the level of police intervention, are fortunately rare.
"But if all other means of addressing inappropriate behaviour have been tried and failed, age alone should not prevent such a course of action."
During the preliminary hearing, the court was told the boys were now friends and play football with each other.