He was in financial difficulties when he asked his former girlfriend if he could sell her sex videos for money.

Concerned for her reputation, the 23-year-old pleaded with Benjamin Yeo Bing Yuan, 25, not to do so and to delete the videos.

Yeo then told her about his financial difficulties and asked her for $4,000 in exchange for deleting the videos. She agreed but asked for time to raise the money.

From May 4 to June 14 last year, Deputy Public Prosecutor Chong Yong said, Yeo text messaged the victim multiple times on different days in relation to the money, such as asking her to set a deadline to transfer the funds to him, and telling her not to "test" him.

Yesterday, the IT administrator was sentenced to four months' jail after admitting to threatening her with injury to her reputation .

The court heard that the pair were in a relationship from 2014 to 2015, during which the victim sent Yeo a number of videos showing herself engaged in sexual acts.

Yeo had also recorded videos of himself and the victim having sex. They broke up in mid-2015 and lost contact.

Early last year, he lost a few thousand dollars through betting on soccer matches.

He took a bank loan in an attempt to recover his losses but ended up losing money again.

He then decided to use the sexually explicit videos in his possession to scare the victim into giving him money.

The victim pleaded with him not to sell the videos.

She also asked to meet him to hand him the money in person, so that she could witness him deleting the videos.

He ignored her pleas, insisted that the money be transferred to his bank account, and continued to threaten her, saying that "(she) should know how viral this can be. Millions of people will get to see it".

The victim made a police report on the evening of June 14. Police arrested Yeo at his home at about 1.40am the next day for attempted extortion.

In mitigation, Yeo's lawyer, Mr Edmond Pereira, said his client did not disseminate the videos which were in his hard disk drive and mobile phone.

He asked the court to give Yeo a chance, saying he is truly remorseful and deeply regrets his actions.

District Judge Low Wee Ping agreed with the prosecution that a deterrent sentence was needed.

Yeo, who could have been jailed for up to two years and/or fined, was allowed to defer his sentence to Feb 15.