Saudi Arabia is to spare the life of a Sri Lankan maid sentenced to be stoned to death for adultery. The government in Colombo said that Saudi authorities had agreed to their requests to show clemency to the woman.

"We have succeeded in getting the death sentence overturned. Our concern was to make sure that the original sentence was not carried out," Harsha de Silva, deputy foreign minister, told reporters in Sri Lanka's capital.

"The government of Sri Lanka wishes to acknowledge and appreciate the good offices of the Saudi authorities. The sympathy, understanding and the concern expressed, and assistance extended, by many other parties is also noted and deeply appreciated."

Da Silva announced that the woman will instead serve a "short" jail sentence, but did not reveal its duration.

The 45-year-old mother of two was sentenced in August, 2014, after being arrested in April for allegedly having an affair with a Sri Lankan man.

Adultery is a capital offence under Saudi Arabia's hard line interpretation of Sharia law, and while the woman was sentenced to death by stoning, the man was sentenced to receive 100 lashes.

Sri Lankan authorities have not appealed on behalf of the man, and it is not known if his punishment has been carried out.

The case sparked protests in Sri Lanka, and calls for the government to ban maids working in Saudi Arabia.

In 2013 Sri Lanka recalled its envoy to Riyadh in protest at the beheading of a maid accused of being responsible for the death of a child under her care. The Sri Lankan government said the woman had not been given access to legal representation, and was only 17 years old when the alleged crime was committed.