A hacker who extorted more than $913,000 by blackmailing users of porn websites was sentenced to more than 6 years in jail in the U.K. on Tuesday.

Sky News reports that 24-year-old Zain Qaiser, a former computer science student, was jailed for six years and five months. In a statement, the U.K.’s National Crime Agency described Qaiser as “a top level cyber criminal who targeted hundreds of millions of computers” across the globe.

The hacker spent the proceeds of his criminal activity on stays in high-end hotels, prostitutes, gambling, drugs and luxury items including a $6,500 Rolex watch, the NCA added.

NEW SCAM TRIES TO BLACKMAIL WITH BOGUS PORN THREATS

"In just one 10-month period, he spent £68,000 [$88,000] on gambling in a London casino, despite being unemployed and living with his family,” the agency explained.

The scam affected users in more than 20 countries, including Canada, the U.S. and countries in Europe.

Working with a Russian-speaking organized crime group, Qaiser bought “masses” of advertising traffic from porn websites using the online name “K!NG.” The hacker used fraudulent identities and bogus companies to pose as legitimate online advertising agencies, according to officials. “Once advertising space was secured, the crime group would host and post advertisements laced with malicious software, known as malware,” the NCA added.

FACEBOOK BATTLES REVENGE PORN WITH ARTIFICIAL INTELLIGENCE

The malware would lock users' devices and display a message purporting to be from local law enforcement or a government agency, demanding that the victim pay a "fine" of $300 to $1,000 to unlock the device.

The total value of the blackmail operation is believed to be much higher than Qaiser’s share of the illegal proceeds. “Zain Qaiser was an integral part of this organized crime group generating millions of pounds in ransom payments by blackmailing countless victims and threatening them with bogus police investigations,” said Nigel Leary the NCA’s senior investigating officer, in the statement. “In addition, when Qaiser’s criminal enterprise was frustrated by diligent members of the online advertising community, he retaliated causing misery and hundreds of thousands of pounds in financial losses.”

“This was an extremely long-running, complex cyber-crime investigation in which we worked with partners in the US, Canada, Europe and the Crown Prosecution Service,” Leary added. “The FBI and the US Secret Service have both arrested people in relation to this global malware campaign.”

In a ransomware attack, hackers typically encrypt a computer network’s data to hold it “hostage,” providing a digital decryption key to unlock it for a price.

CLICK HERE TO GET THE FOX NEWS APP

There have been other incidents where porn was used as an extortion tactic. A recent email scam, for example, made bogus claims about pornography use in an attempt to extort money.

Brooke Crothers contributed to this article. Follow James Rogers on Twitter @jamesjrogers