Saudi Arabia has beheaded an Indonesian woman with a suspected mental illness accused of killing her reportedly abusive employer, in a move that drew the anger of Jakarta and rights groups.

The Indonesian government summoned the Saudi ambassador after Siti Zainab was executed in Islam's holy city of Medina, after more than 15 years on death row.

Amnesty International denounced the beheading as the latest in a "recent macabre spike in Saudi Arabia's state-sponsored killings", adding it was against international law to put to death a convict possibly suffering from mental ailments.

"Imposing the death penalty and executing someone with a suspected mental illness smacks of a basic lack of humanity," said Philip Luther, Amnesty's Middle East and North Africa director.

The rights group said that the execution was in breach of a UN a resolution urging states to refrain from capital punishment when people with mental disorders are involved.

Zainab, a domestic worker, was sentenced to death in 1999 after she confessed to stabbing to death Saudi woman Noura al-Morobei, who was described in the Saudi press as her employer.

Amnesty said sources in Indonesia claimed the woman had been mistreated at work and denounced the alleged cruel behaviour of al-Morobei and her son in two letters.

Indonesian NGO Migrant Care went further, claiming that Zainab was actually acting in self-defence when she fatally stabbed al-Morobei 18 times.

"She had no legal representation at any stage and did not have access to a consular representative during the police interrogation when she had made her 'confession'," Amnesty said. "According to reports, the police suspected that she suffered from mental illness at the time of the interrogation."

Her death added to Saudi Arabia's execution toll in 2015, which stands high at more than 60 people killed, with rights groups saying the country is well on track to surpass its previous annual record.

Zainab's capital punishment was delayed until her victim's youngest child reached the adult age required to decide whether to ask authorities to go ahead with the punishment or pardon the culprit instead.

After assuming office in October last year, Joko Widodo became the fourth Indonesian president to write to the Saudi King asking for clemency for Zainab. The appeals fell on deaf ears as the woman was eventually beheaded this week.

"The Indonesian government filed a protest against the Saudi Arabian government for not giving prior notification to Indonesian representatives or to the family over the execution date," Indonesia's foreign ministry told AFP.

Riyadh's envoy to Jakarta said the issue with the fellow Muslim state was not over the execution itself but about its timing.

"The problem is not about the court and the execution, it is about the date of the execution," Mustafa Ibrahim Al-Mubarak told the news agency after being summoned. "I have to check what went wrong."

Indonesia also implements the death sentence and is locked in a separate diplomatic quarrel with Australia over plans to execute two alleged drug traffickers.