A youth tired of being mocked by his cousin decided to get his own back by taking photos and videos of her showering and posting them online.
The 19-year-old, who cannot be named due to a gag order to protect his 17-year-old cousin's identity, posted two videos and eight pictures of the girl naked on content-sharing site Tumblr.
He even captioned them with her name and the school she attended.
The youth was sentenced to a year and nine months' probation yesterday after pleading guilty last month to one count each of insulting his cousin's modesty and transmitting obscene materials.
The court heard he had become unhappy with his cousin in December 2016 as he felt that she had been mocking and embarrassing him in front of his family and friends.
On June 18 last year, he went to her home and placed his mobile phone underneath a bathroom window to record images of her showering. The girl later spotted the device and returned it to him but did not suspect that anything was amiss.
He uploaded the videos and photos on Sept 3 last year.
Deputy Public Prosecutor Dora Tay said: "He wanted the victim to experience the same feeling of embarrassment that he had felt."
Nine days later, a netizen alerted the girl about the images via social app Snapchat after locating her online.
She realised they had been taken in her home and recalled finding her cousin's mobile phone in the bathroom earlier that year.
Her brother confronted the youth who admitted to the offences before removing the images and deleting his online accounts. The girl alerted the police the next day.
As part of his sentence, the offender was also ordered to perform 150 hours of community service and his mother was bonded for $5,000 to ensure his good behaviour. He was also banned from possessing and using any image-capturing devices unless approved by his probation officer.
For insulting his cousin's modesty, he could have been jailed for up to a year and fined.