Jakarta has filed an official protest with Saudi Arabia after the oil-rich kingdom executed an Indonesian domestic worker without notifying her family or consular staff.

Tuti Tursilawati was executed Monday in the city of Thaif, Indonesia's foreign ministry said, seven years after she was sentenced to death for killing her employer in an act she claimed was self defense from sexual abuse.

President Joko Widodo criticized the decision Wednesday, saying the government has officially protested to Riyadh and demanded better protection of Indonesian workers in the country.

Get Breaking News Delivered to Your Inbox

Lalu Muhammad Iqbal, director at the foreign ministry's Indonesian citizens protection department, told reporters on Tuesday the move was "regrettable".

"The execution of Tuti Tursilawati was done without notification to our representatives, either in Riyadh or Jeddah," he said at a press conference.

Tursilawati claimed she was acting in self defense when she killed her employer in 2010 after he tried to rape her.

Migrant Care, an NGO advocating for the rights of Indonesian workers abroad, condemned the execution and urged the government to take serious diplomatic steps.

It said Indonesia should reverse its recent decision to allow a limited number of Indonesian migrant workers to Saudi Arabia despite a 2015 moratorium banning new domestic workers from entering 21 Middle Eastern countries.

Indonesia introduced the ban following the execution of two other Indonesian maids by Saudi Arabia the same year.

Drug trafficking, rape, murder, apostasy and armed robbery are all punishable by death under Saudi Arabia's strict version of Islamic sharia law.

As well as the Middle East, Indonesia also sends domestic workers to many parts of Asia, including Singapore, Hong Kong and Malaysia, and has often complained about the treatment of its workers abroad.

A Hong Kong woman was jailed for six years for beating and starving her Indonesian maid and keeping her prisoner, in a high-profile case that drew attention to the abuse of domestic helpers in the financial hub.