A woman in Saudi Arabia has secretly filmed her husband cheating on her at their home by groping a housemaid. The vengeful wife published the video online, but now faces up to one year in prison according to the kingdom’s laws against revenge videos.

In the scandalous video, a man in traditional Saudi white robes is seen apparently putting his hands all over a female maid in a room that looks like a kitchen. At one point, when the woman's hands are busy as she's holding a tray or a plate, the man tries to kiss her, while she attempts to pull away.

READ MORE: Saudi diplomat accused of rape in India claims immunity, files complaint

The alleged encounter of the husband with his domestic staff was apparently secretly filmed by the man's wife with a phone camera. She then posted it online, local media reported this week, saying that before the original clip was taken down from the internet it had gone viral in the Arab state.

"The minimum punishment for this husband is to scandalize him," the unnamed wife wrote in her caption to the video, Emirates 24/7 News reported.

"The hashtag, #SaudiWomanCatchesHusbandCheating, has attracted more than 25,000 mentions in less than 12 hours." https://t.co/Iwx0ZN4WnP — Alexander Marquardt (@MarquardtA) October 6, 2015

Her public revenge has divided social media users in Saudi Arabia, Gulf News reported, saying that her actions have been both condemned and supported by people in the devout Muslim society.

"What she did in fact was to expose her private life and problems for everyone to see," the media cited one blogger as saying. "She has to live with the consequences of what she did.”

No woman, no vote? ‘Only 16 female voters’ registered for Saudi municipal elections http://t.co/jvovJykDRMpic.twitter.com/H4AL70SwbJ — RT (@RT_com) September 1, 2015

"I salute you warmly for your valiant courage," another blogger reportedly wrote, adding that "there was an urgent need for revenge and your revenge is the best."

But in what might come as a surprise to a western audience, the revenge is now upon the Saudi woman herself, as according to the Gulf state’s laws she might be jailed for up to a year.

#SaudiWomanCatchesHusbandCheating but she's the one in trouble. Barbaric backward culture. Why is #Merkel intent on importing it to Europe? — Sau Peih (@saupeih) October 8, 2015

According to Saudi lawyer Majid Qaroob, cited by Emirates 24/7, the man’s wife "faces up to one year in prison or a fine of SR [Saudi Riyal] 500,000 [around $133,000] for defaming her husband."

The law "on information technology crimes" stipulates "stiff punishment" for anyone who films others with various devices, including smartphones with cameras, in order to "defame them," the Saudi lawyer said.