An inmate is to face trial over an alleged assault on a prison officer after a High Court judge quashed the decision to drop the case against him.
Kevan Thakrar, 26, of Stevenage, Hertfordshire, is being held at HMP Manchester.
The Prisoners Officers' Association union (POA) challenged a Crown Prosecution Service decision to drop the case against him.
Earlier, Mr Justice Stewart quashed the decision and reinstated the case.
Thakrar is now due to stand trial at Manchester Magistrates' Court.
It is alleged he threw excrement in the face of a female prison officer.
At a judicial review of the case at the High Court, sitting in Manchester, the POA successfully argued for the case to be reinstated, describing the CPS decision as "ludicrous".
The POA had told the court the CPS had discontinued proceedings because it was no longer in the public interest to prosecute.
In response to Mr Justice Stewart's decision, the CPS said: "We recognise how important it is that prison officers feel protected in the workplace and we continue to work with our Prison Service colleagues to increase the confidence in this area.
"The decisions made in this instance were due to the unique circumstances of the case but we accept the ruling of the High Court and a prosecution will now be reinstated."
Andrew Selous, the Conservative prisons minister, said all incidents inside prisons would be "referred to the police and considered for prosecution".