A woman jailed unlawfully over council tax bills has said she wants laws changed to stop others going through the ordeal.
Melanie Woolcock from Porthcawl was given an 81-day sentence by Bridgend magistrates in July 2016 for failing to pay £10 a week towards her debt.
She spent 40 days behind bars before a charity helped secure her release.
In a decision on Wednesday, Mr Justice Lewis ruled she should never have been imprisoned.
Ms Woolcock told BBC News she happened to walk into the prison library and found details of a charity which helps women in prison and contacted them, which helped to secure her release.
She said she has since been approached by university law departments asking her to support efforts to change the law, to stop others ending up in a similar situation.
London's High Court heard Ms Woolcock owed more than £4,700.
She said she was too sick to work and struggled to pay rent and feed herself and her teenage son, so had defaulted on repayments.
She told BBC News she has never committed a crime or had a parking ticket.
"When I came home [from prison], I didn't realise the effect it had on me, I couldn't sleep.
"My son was traumatised in the manner I was taken. I had to leave my son screaming, crying."
She said she was up to date with the payments when she was jailed, but was told she had paid too late.
"I think it's wrong that if you're struggling with a bill that you are sent to a prison full of criminals when I've never committed a crime in my entire life, never had a parking ticket."
A Bridgend county council spokesman said authorities had a legal responsibility to collect unpaid council tax, but offer support and help to anyone who is experiencing difficulty and prosecution is always a last resort.
He added: "We understand that the resident in this case was jailed after failing to meet the requirements of the suspended sentence issued by the magistrates' court.
"Our advice to anyone who is experiencing difficulty paying their council tax is to contact us as early as possible so that we can help and advise them."