Image copyright Reuters Image caption The Supreme Court had rejected Baiq Nuril Maknun's judicial review

Indonesia's parliament has approved a pardon for a woman sentenced to jail for recording a call with her boss to prove he was sexually harassing her.

President Joko Widodo granted the amnesty to Baiq Nuril Maknun after the Supreme Court rejected her appeal.

The mother of three wept as she told parliament: "Don't let anyone else have an experience like mine."

Activists say the case highlights Indonesia's lack of safeguards for women in sexual harassment cases.

Earlier this month, the Supreme Court upheld the six-month jail sentence handed to the teacher for recording and sharing a phone conversation she had with her boss, saying she had produced no new evidence.

Nuril was held in police custody during the trial for two months and three days, but did not serve time in prison.

She told parliament, to applause from lawmakers: "It hurt so much. I hope there won't be any more victims, and women should dare to speak up."

Baiq Nuril Maknun had complained of getting lewd phone calls from the headteacher of the school she worked at in Mataram, a city on the island of Lombok.

She recorded one of the calls in which the head teacher allegedly made sexually explicit and abusive comments. The recording was later distributed among staff at the school and submitted to the head of the local education agency. It also went viral on social media.

The headteacher - who court documents say lost his job after the recording was circulated - reported her to the police for distributing the recording of their conversation. She says it was shared by someone else.

A local court initially cleared her but prosecutors took the case to the Supreme Court. It found her guilty in November of "violating decency" and fined her 500 million rupiah (£28,200; $35,200).

President Widodo had previously said he would consider a request for a pardon if she failed in her legal appeals. Her lawyers stressed their client had not committed a crime.