The convictions of 15 sex offenders in the north are to be rescinded due to a British Government error in drafting updated legislation.
The convictions for indecent assault and unlawful carnal knowledge involve 17 victims, 11 of whom were children at the time of the offences.
One of the convicted offenders is still on the Sex Offenders Register but will now be removed as a result of the blunder.
Prosecutors are now to decide whether to pursue fresh prosecutions.
All the defendants were tried in magistrates' courts in the north between 2009 and 2017. The offences were committed between 1973 and 2009.
One was handed a prison term while others received suspended sentences.
The convictions will be ruled invalid after it was discovered that a mistake was made in legislation introduced in 2009 as part of reforms of the criminal law relating to sexual offences.
The error saw three specific offences removed from the list of those that can be heard before magistrates' courts in Northern Ireland.
The mistake was made under the watch of the British Government, as it happened before the devolution of justice powers to the Stormont Executive in 2010.
As the error was inadvertent, none of the criminal justice agencies or relevant legal bodies in Northern Ireland were informed and they continued to deal with cases as they had previously, assuming the offences could still be dealt with by a magistrate.
That meant prosecutors opted to try the defendants in magistrates' courts - with the consent of all 15 - at a time when the incorrectly drafted legislation dictated the cases could only be heard in a crown court.
Assistant director of Northern Ireland Public Prosecution Service (PPS) Ciaran McQuillan apologised to the victims.
"We are truly sorry to have to inform all affected by this unforeseen and undetected error in the law," he said.
"This development will have come as a great shock and disappointment to the victims. It will also cause uncertainty for the defendants involved."
The mistake was first identified in 2018. Prosecutors say they have been working in the two years since to identify all the cases it impacted.
On Wednesday, the PPS moved to inform all victims and offenders of the development.
A support package has been put in place for the victims, with the PPS working in conjunction with Stormont's Department of Justice (DoJ) and support organisations Victim Support NI and Nexus NI.
Cases dealt with by a magistrate are deemed to be less serious than those in a crown court.
The maximum penalty that can handed out by a magistrate in such cases is a 12-month custodial sentence.
Mr McQuillan said a fresh prosecutorial decision in each case will be taken within as short a timeframe as possible and that engagement with the victims would be an important part of that process.
Any new case will be heard before the a crown court and it is likely that sentencing after any subsequent conviction would take account of punishments already handed down after the original invalid trials.
Mr McQuillan tried to reassure other victims of sexual assault in Northern Ireland.
"Victims should not allow the unusual circumstances which led to this development to diminish confidence in coming forward to report their experience," he said.
"Victims can continue to come forward in the knowledge that they will be treated with sensitivity and respect."