Tatiana Malachi was brought to South Africa in 2008 by House of Rasputin Properties, which ran a Cape Town dance club. The owners said she owed them for the money spent on her accommodation, visas and other travel costs.
The owners kept her passport to ensure she paid. When they learned she had sought help from Russian diplomats and planned to leave the country in July 2009, they had her arrested. After spending two weeks in jail she returned to Moldova.
In a ruling this week, South Africa's highest court said portions of the country's debt law dating back to 1944 allowing for such detention were unconstitutional.
In his ruling, Constitutional Court Justice Mogoeng wa Mogoeng ordered anyone being held in prison for unpaid debt should be "released with immediate effect."
Mogoeng said that although Malachi triumphed in court, "nothing can undo the degrading effect of incarceration."
"Freedom is an important right. The detention of any person without a just cause is a severe and egregious limitation of that right," Mogoeng said.
He said it would be difficult to imagine circumstances in which a law allowing detention without cause could be justified.