A legal challenge brought after a south Wales woman was unlawfully jailed over council tax debts has found potential errors in up to 18% of similar cases.
Melanie Woolcock, from Porthcawl, was given 81 days in prison by Bridgend magistrates after failing to pay £10 a week towards her debt.
It was later ruled she should not have been imprisoned.
Cardiff's High Court now ruled between 9.5% and 18% of jailings for debt could be unlawfully given each year.
Ms Woolcock was freed from prison after 40 days after finding details of a charity in prison who work with female prisoners, which helped to secure her release.
She said afterwards she had been too sick to work and had struggled to pay rent and feed herself and her teenage son, so had defaulted on repayments.
She sought a judicial review to ensure others were not jailed unlawfully.
On Wednesday, the High Court handed down the judgement which found individual errors were to blame for the high number of mistakes rather than a "systemic deficiency".
An analysis of 95 cases between April 2016 and July 2017 found between nine and 17 people were jailed unlawfully because the court ordered repayment over an excessive window of time.
It found the main reason was due to means' inquiries - held to determine how much a person owing council tax must repay to service the debt - being held in the debtor's absence.
Regulations governing such inquiries say they must be held in the debtor's presence.
Ms Woolcock's challenge was backed by the law charity Centre for Criminal Appeals.
Barrister Cathryn McGahey QC, who argued Ms Woolcock's case, has estimated the number of unlawful committals to prison each year at a much higher figure of 52%.
She believes incorrect means' assessments or incorrect judgements by magistrates that people were failing to pay because of "culpable neglect" or "wilful refusal" are other reasons why imprisonments could also be unlawfully imposed.
The judgement said: "Ms McGahey appears to be right to condemn the relevant magistrates (and their legal advisers) as being ignorant of well-established law."
It suggested further training and guidance could be given to legal advisors and solicitors to address the problems.
Naima Sakande, women's justice advocate at the Centre for Criminal Appeals, said: "The toll of being sent to prison unlawfully cannot be overstated and more must be done to protect society's most vulnerable from needlessly losing their liberty.
"Poverty is not a crime and our judicial system needs to do more to acknowledge this."
A Welsh Government spokesman said: "We welcome today's judgement and will respond in more detail once we have had time to properly consider its implications."