Story highlights Saudi authorities execute Rizana Nafeek, a Sri Lankan woman

She was convicted of killing a baby of the family employing her as a housemaid

But rights groups say her treatment and trial had serious flaws

The Sri Lankan government says it "deplores" the execution

A young Sri Lankan woman has been beheaded with a sword in a small, dusty town in Saudi Arabia, thousands of miles from the lush jungles and idyllic beaches of the country where she grew up.

Rizana Nafeek arrived in Saudi Arabia in 2005 and spent her first few weeks in Saudi Arabia working as a housemaid to earn money to support her relatives back home who had been displaced by the massive tsunami in the Indian Ocean the year before.

She then spent the next seven years in Saudi jails as she was accused, charged, convicted and sentenced to death in the killing of her employers' 4-month-old son. Authorities executed her Wednesday in Dawadmi, about 200 kilometers west of the Saudi capital, Riyadh.

The family said she had strangled the boy, Kayed bin Nayef bin Jazyan al-Otaibi, after being asked to bottle-feed him. Nafeek said the infant accidentally choked on milk.

She found herself plunged into the unfamiliar, unfriendly and -- according to many human rights advocates -- unfair Saudi legal system.

In cases where the death penalty is possible, "defendants are rarely allowed formal representation by a lawyer and in many cases are kept in the dark about the progress of legal proceedings against them," Amnesty International says.

Nonetheless, human rights groups and the Sri Lankan government lobbied Saudi authorities to release her, or at the very least show some leniency in her complicated case.

They argued that the courts had failed to take into account Nafeek's birth certificate, which showed she was only 17 at the time of the baby's death in 2005, making her too young to receive the death penalty under international law.

The passport she used to enter the country, which said she was 23 at the time, was inaccurate and had been falsified, they said.

Additionally, she had not had access to lawyers during her pre-trial interrogation during which she said she was assaulted and forced to sign a confession under duress, rights groups pointed out.

Right up until the end, they pointed out that the dead boy's family could still grant Nafeek a pardon or request blood money as compensation.

But those arguments and others, as well as numerous visits by Sri Lankan ministers and members of Nafeek's family, failed to sway Saudi authorities.

The interior ministry statement announcing the execution began with a verse from the Quran, according to SPA, the official Saudi News agency: "O ye who believe! the law of equality is prescribed to you in cases of murder."

The death penalty for Nafeek had been approved by the Supreme Court, the agency reported, and a "high order was issued" to carry out the sentence.

The Sri Lankan government and human rights groups have sharply criticized Saudi Arabian authorities for the beheading of Nafeek.

It shows "once more how woefully out of step they are with their international obligations regarding the use of the death penalty," said Philip Luther, director of Amnesty International's Middle East and North Africa program.

President Mahinda Rajapaksa of Sri Lanka, who had made personal appeals for clemency in Nafeek's case , said he and his government deplored the decision to go ahead with the execution. Lawmakers in the Sri Lankan parliament observed a minute of silence Wednesday to mourn her death.

But her case appears to be far from a one-off occurrence.

Many of the people executed in Saudi Arabia in recent years have been foreign citizens, according to Amnesty International, most of them "migrant workers from poor and developing countries."

In 2012, Amnesty said it had recorded at least 79 executions in the country, 27 of them of foreigners.

Saudi Arabia also has a history of carrying out the death penalty on people convicted of committing crimes when they were children, according to Human Rights Watch.

"Rizana was just a child herself at the time of the baby's death, and she had no lawyer to defend her and no competent interpreter to translate her account," said Nisha Varia, senior women's rights researcher at Human Rights Watch. "Saudi Arabia should recognize, as the rest of the world long has, that no child offender should ever be put to death."