JAKARTA, Indonesia — After 10 years in a Saudi prison, Ati Abeh Inan finally made it back to Indonesia last month. On death row for “casting a magic spell on her employer and his family,” she was pardoned by King Abdullah.

Needless to say, she was very lucky.

About 40 other Indonesian domestic workers still face potential death sentences in the Saudi kingdom. They’ve been convicted of witchcraft, sorcery or of murdering their employers. Five have exhausted all judicial appeals.

Migrant Care, an Indonesian NGO following their cases, says most of the convicts acted in self-defense against sexual or physical abuse.

For years, rights groups have reported the horror stories of maids in Saudi Arabia.

Nisha Varia, a Human Rights Watch senior researcher who has interviewed domestic workers in Saudi Arabia says she has spoken to women “whose employers beat them, threatened to kill them and dump them in the trash, compared them to animals.” They’ve alleged rape, harassment, mistreatment, torture, and having their bodies burned with irons and boiling water. Some have had nails hammered into their hands.

Behind the closed doors of private homes, the fate of the one to two million domestic workers in Saudi Arabia depends solely on their employers’ will. Migrant Care's director Anis Hidayah explains they are much more at risk than other migrant workers because they’re extremely isolated. “It's very difficult to monitor the situation in the houses of employers,” she says.

In addition to the abuse, human rights groups have described slave-like conditions.

Domestic workers often work from dawn to late at night, sometimes up to 100 hours a week, with no day off. They often lack adequate food, and they sleep in the kitchen or in tiny rooms if they’re lucky. They are not entitled to overtime pay or compensation in the case of work related injury.

And they’re not allowed to resign.

The “kafala” system of sponsorship means a worker’s visa and stay is tied to the one person who gives them a job and a house. This creates an opportunity for exploitation and abuse, experts say.

In 2011, after one of its nationals was executed for killing her allegedly abusive employer, Indonesia decided it had had enough. Its embassy in Riyadh, which had been seeking clemency for the domestic worker, wasn’t even notified until after her decapitation. Jakarta called it “unacceptable,” against “norms and manners” of international relations. The president, Susilo Bambang Yudhoyono, announced a moratorium on sending domestic workers to Saudi Arabia.

Three years later, the ban might soon be reversed.

At the end of February, the two countries signed a “historic and remarkable” agreement, as Indonesian minister of manpower and transmigration, Muhaimin Iskandar, described it. Indonesian domestic workers in Saudi Arabia will now have access to very basic rights.

They will no longer be deprived of their passports, and will be allowed to communicate with their families, get paid monthly, and have some time off.

Calls for clarifications on how the agreement will be implemented and monitored are yet to be answered.

Until last year, domestic workers were completely excluded from Saudi labor law. In July 2013, the government introduced some new labor regulations for domestic workers, including an outrageous limit of 15 hours of work a day. Yet while maids are considered the most vulnerable group among migrant workers, they are still not granted the same protection as others.

“There needs to be strong regulations that set the standard for what treatment should look like. If you ask average employers in Saudi Arabia, they think it’s acceptable to take the domestic worker’s passport because they’ve paid a lot of money to recruit her,” says Nisha Varia. “There needs to be a change in the norms and regulations to make it clear that it doesn't mean that they then can completely control the domestic worker.”

According to Migrant Rights, 30 to 50 maids report abuse and exploitation every day at the center for housemaid affairs in Riyadh, which deals with runaway maids and those who refuse to work for their sponsors. The center coordinates with the domestic workers' sponsors and embassies to solve the problem, but only accommodates them for a maximum of a week, after which they're deported if no solution is found.

Those who dare submit official complaints for mistreatment face the risk of employers filing counter-claims of witchcraft or adultery, which are severely punished in Saudi Arabia.

According to Indonesian authorities, some 6.5 million Indonesians work overseas, mainly as domestic workers in the Middle East, Hong-Kong, Singapore and Malaysia. Cases of abuse are not limited to Saudi Arabia. In January, the story of Erwiana Sulistyaningsih, a 23 year-old maid who came back to Indonesia on a wheelchair after having been tortured for months by her employers in Hong-Kong, sparked outrage across Indonesia. The president called Erwiana Sulistyaningsih’s father to tell him he was “angry.”

But Indonesian officials are less inclined to condemn the fact that the country’s estimated 2.6 million maids working in Indonesia are also still in legal limbo and facing daily abuse.

“There is nothing protecting domestic workers at the moment. There is no regulation on their working hours, no standard for wages or days-off,” says Albert Bonasahat, from the International Labor Organization office in Jakarta. He says it makes it harder for Indonesian delegations to negotiate better conditions for their workers overseas. “When they ask for a weekly day-off for example, the destination country will reply, well, do you have such regulation in Indonesia?”

Amnesty International recently accused Indonesia of “dragging its feet” on a domestic workers law, stuck in parliament since 2010. The parliament only has a few months to make a change until the bill expires in September this year.