Sex offence convictions against 15 people are to be set aside because of "legislative error," the Public Prosecution Service (PPS) has said.
The cases involve 17 victims, the majority of whom were children at the time the offences occurred.
The PPS has discovered "a technical change in the law" in 2009 meant the cases should not have been prosecuted in a magistrates court.
It said it is "truly sorry" for the distress the news will cause victims.
The PPS will now consider whether or not to re-run the cases in a crown court.
The cases cover offences of indecent assault or unlawful carnal knowledge which occurred between 1973 and 2009.
One was handed a prison term while others received suspended sentences.
One of the convicted offenders is still on the sex offenders register but will now be removed as a result of the error.
PPS assistant director Ciaran McQuillan 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 PPS has arranged for delivery of letters to all those affected with a detailed explanation of how the situation arose and the steps we are now proposing to take."
Mr McQuillan said a fresh prosecutorial decision in each case will be taken within as short a time frame as possible and that engagement with the victims would be an important part of that process.
Any new case would be heard before 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.
The PPS said it was discovered that an amendment to legislation in 2009, made by the UK government, had "unintentionally removed" three specific offences from those which could be prosecuted in a magistrates court.
That meant that from that point onwards the offences could only be prosecuted in the crown court.
As this change was inadvertent, it was not highlighted at the time to any of the agencies or practitioners in the criminal justice system, including the PPS.
It was first discovered in 2018 that a mistake had been made, with prosecutors working in the intervening period to identify the cases affected.
All the defendants were tried in magistrates' courts in Northern Ireland between 2009 and 2017.
The convictions that will be rescinded involve:
- 14 victims of indecent assault on a female contrary section 52 of the Offences Against the Person Act 1861;
- One victim of indecent assault on a male contrary to section 62 of the Offences Against the Person Act 1861;
- Two victims of unlawful carnal knowledge contrary to section 5(1) of the Criminal Law Amendment Act 1885.
The department will also have to decide whether new legislation is needed to correct the error.
Justice Minister Naomi Long said she had spoken to the PPS about the error.
"I am particularly concerned about the impact on the victims of these offences and note that the PPS has been working closely with Victim Support and Nexus to ensure those affected are both advised of the problem sensitively and receive proper support from the outset," she said.
"I am assured that the PPS will be reapplying the prosecutorial test to determine whether any of the cases should result in fresh prosecutions."