A court in Iran has sentenced eight people to up to 20 years in prison for criticizing the regime on Facebook, reports AFP, quoting a popular opposition website.

The defendants were sentenced last week for insulting the supreme leader [Ayatollah Ali Khamenei] and the authorities, anti-regime activities, sacrilege and spreading lies," wrote the website Kaleme. The minimum sentence handed down was seven years imprisonment.

Kaleme, however, did not cite a source for the court ruling, and AFP could not verify it independently.

Access to Facebook and other social networks is blocked by the Tehran regime, which considers them anti-Islamic, immoral and anti-establishment. However, tech-savvy Iranians have found ways around the ban, which is imposed by technological filter.

Last week six Iranians were arrested after posting a video showing them dancing to Pharrell Williams' megahit "Happy." The six were released on bail, but not before the video went viral.

How Iran should deal with the Internet is an issue that divides the nation's conservatives and reformers, with the latter's leader, President Hassan Rohani, arguing that the country cannot insulate itself from progress. In May Rohani vetoed a conservative web censorship panel's plan to ban the use of WhatsApp.

The draconian sentences reportedly meted out to the "Facebook Eight," however, are a reminder that hardliners continue to hold sway over Iran's judicial system.

