The Shura Council of Saudi Arabia, the country's formal consultative body, has approved a law to criminalise sexual harassment in the kingdom.
The aims of the measure are "fighting the crime of harassment, preventing it, punishing perpetrators and protecting victims in order to preserve the privacy, dignity and individual freedoms as guaranteed by Islamic jurisprudence and regulations in place".
It was drafted by the Interior Ministry after instructions from King Salman, according to local media reports.
However, with men and women barred from intermingling in the strictly conservative Islamic kingdom, Saudis on social media have, largely, responded with humour.
The law provides for penalties of up to two years in prison and fines which could amount to $26,600 (£19,641). In some cases, such as repeat offenders, the sentence could be increased to five years in prison and fines of up to $80,000.
The bill, which preserves the anonymity of alleged victims, also criminalises incitement to sexual harassment, as well as falsely reporting an incident to the authorities.
It also stipulates alleged victims cannot withdraw a complaint or fail to report an incident to the police.
The document also creates an obligation for public and private institutions to make all necessary arrangements to prevent harassment.
Last week in Saudi Arabia at least 11 women's rights activists were reportedly arrested in a crackdown, according to human rights groups. Most of them were women who campaigned for the right to drive.
The kingdom has announced that the ban on women driving will end next month, despite opposition from conservatives.