The court has directed the government to launch an awareness campaign. (Representational)

A special Pakistani court has sentenced a man to five-year rigorous imprisonment for posting blasphemous content on social media, becoming the first such case under the country's new cybercrime law.

The special court for cybercrime sentenced Sajid Ali, an active member of the Shia sect, after he was charged for posting "sacrilegious, blasphemous and derogatory" material on Facebook in 2017.

He was punished under section 11 of the Prevention of Electronic Crimes Act 2016 and 298-A of the Pakistan Penal Code, which deals with the use of derogatory remarks against holy personalities of Islam.

Sajid Ali, a resident of Bahawalnagar's Chishtian tehsil, some 400 kms from Lahore, was booked by the local police on the complaint of people in his locality.

The case was later transferred to the Federal Investigation Agency (FIA) Cyber Crime Circle Lahore over the issue of jurisdiction.

The FIA has termed the sentence a "first-of-its-kind" in Pakistan under the new cybercrime laws.

FIA Prosecutor Munam Bashir Chaudhry produced 12 witnesses including FIA Assistant Director Naeem Zafar who also submitted his technical analysis report.

Most witnesses testified against Sajid Ali, he said.

"The first conviction in the country under the new cybercrime laws on charges of posting blasphemous material against companions of Prophet Muhammad (Peace be upon him) on social media," FIA Cyber Crime Lahore head Sarfraz Chaudhry told PTI.

"The court has also directed the government to launch an awareness campaign to aware the people about cybercrimes especially the blasphemous content," he said.

Blasphemy is considered a sensitive topic in Pakistan and those accused of it often languish in jails for years.

Pakistan has a history of giving stringent punishments to people accused of blasphemy.

Last year, the Supreme court had acquitted Aasia Bibi, the first woman to be sentenced to death under Pakistan''s controversial blasphemy laws, in a high-profile sacrilege case that polarised the society.

The 47-year-old mother of four, now in Canada, was convicted in 2010 after being accused of insulting Islam in a row with her neighbours.

She always maintained her innocence but spent most of the eight years in solitary confinement.