Inmates at Ward 350 of Evin Prison in northwestern Tehran endure brutal conditions: regular beatings, sexual harassment, even torture. The Ward has become home to an increasing number of Iran's most prominent cyberactivists and intellectuals this past year, including Soheil Arabi, a 30-year-old man arrested in 2013 and charged with sabb al-nabbi, or “insulting the Prophet.” Arabi's charge stems from a reference to the Prophet Muhammad in a Facebook post. He found out in November his government is going to kill him. The country's Supreme Court upheld the death sentence handed down by a lower court.

Arabi's case, garnering media attention around the world after his sentencing, is the most shocking example of Iran's recent crackdown on Internet activists, human-rights groups and cyberdissidents -- a crackdown that reveals a split at the top between moderate President Hassan Rouhani and hardliners associated with Supreme Leader Ayatollah Ali Khamenei, Iranian online activists said. Access to the Internet, which reforms promoted by Rouhani could make easier, is the latest battleground in the fight between the two camps.

Leading human-rights advocates say there has been a clear increase in the number of activists arrested, detained and tortured because of their activity on social media, particularly on Facebook, since Rouhani took office in August 2013. The detentions come as Iran's hardliners struggle to keep tabs on a growing population that wants greater freedom of speech, a right Rouhani promised he would fight for when he was elected.

"There is a campaign of intimidation in Iran, and there has been a definite uptick in arrests under Rouhani ... but it is happening under the judiciary and intelligence services," said Hadi Ghaemi, director of the International Campaign for Human Rights in Iran, one of the few groups monitoring Internet repression in the country. The intelligence services are largely run by Khamenei and his supporters, and the judiciary is independent of the president.

"We believe much of the policies on repression were formulated by the supreme leader and his office," said Gissou Nia, deputy director of the International Campaign for Human Rights in Iran. Nia is responsible for interviewing dissidents inside Iran who have been interrogated about their activities online.

Rouhani understood that expanding access to Internet would help the country's economy, Ghaemi said. Its economy has been hit hard by sanctions imposed by the U.S. and European Union. If Rouhani succeeds in easing sanctions, it will allow foreign companies to tap into the growing Iranian population that is seeking full access to the Internet.

It will also allow technology and gaming companies to enter the market, pumping a significant amount of cash into the economy. Rouhani permitted the restructuring of the telecommunications sector and pushed for the implementation of 3G and 4G mobile networks in the country. Meanwhile, hardliners were working to limit access to, and enhance control of, the Internet, which is largely censored in Iran. To them, the Internet is "a threat to the culture they are trying to impose on the country and shows that the government narrative of what the country is about is in complete contradiction to the reality on the ground," Ghaemi said. "They are sensitive to any potential protests being formed online."

The Revolutionary Guard Corps, largely influenced by the supreme leader, have a branch known as the Cyber Army that has recently become active in pursuing cybercrime in Iran. According to a November report by the International Campaign for Human Rights in Iran, the Revolutionary Guard created the Cyber Army in the wake of the 2009 protests. Since then, it has acted as Iran's offensive arm in cyberspace, attacking and bringing down any domestic website that engages in activities it sees as transgressive.

The highest body responsible for overseeing the Internet is the Supreme Cyberspace Council, formed by Khamenei in 2012. A working group within the Council has criminalized content deemed contrary to "public chastity and morality," "sacred Islamic principles," "security and public peace" and "government officials and public institutions." The council is developing infrastructure that gives various state agencies full control over Internet access inside Iran.

The government is also ramping up its filtering activities to censor certain websites and information, and is even trying to create its own version of the Internet, which would exponentially increase the state's control over online access and use in the country. That system would function domestically and would essentially disconnect Iranian cyberspace from the rest of the world.

"People, without knowing, are being monitored and are being recorded," Ghaemi said. "Very routinely, people tell us that when they are taken for interrogation, the interrogators already have a big pile of printouts, emails and Skype communications."

Arabi was arrested last year for his content on his Facebook pages, including one called 'The generation that no longer wants to be the burnt generation." His was not the first case to gain notoriety as an Iranian arrested for cyberspace activities. In perhaps the most brutal and high-profile detention, the Cyber Police, the cybercrime unit of the national police force, arrested 35-year-old Sattar Beheshti for his blogging activities. He died under torture while in custody in November 2012. This October, several Iranian journalists were arrested after covering a series of acid attacks against women in Isfahan province. Two of them were released, but the others remain in custody. The arrests triggered rallies in the streets of Isfahan and Tehran, and activists called for more protests on social media.

Many young, tech-savvy Iranians have found ways of bypassing government censorship by using virtual private networks, or VPNs, which protect users' identities and allow them to operate without detection. Collin Anderson, a researcher who's an expert on Internet freedom in Iran, studies how the Iranian government purposefully slows down Internet speed during protests. According to Anderson, this tactic, known as throttling, has led an increasing number of Iranians to access the Internet through VPNs. Although the exact number of people in Iran using them is unknown, Anderson estimates it to be at least 20 percent of Internet users.

But the government has become smarter, too, the International Campaign for Human Rights' Nia said. Since 2009, Iran's intelligence ministry has been selling its own VPNs on the market, camouflaging them as regular devices from independent makers. In fact, they enable spying. "They are fooling everyone," Ghaemi said. "They are monitoring them."

Anderson said Iran is currently trying to increase its surveillance activity online, but sanctions have hindered that process because they have kept the country from acquiring new surveillance equipment. If Rouhani has his way, Iran might move in the opposite direction. The president is not involved in Internet policy because he is focused on other areas, namely, the talks with six Western nations on a deal suspending sanctions in exchange for Iran halting its uranium-enrichment program.

"Rouhani does not have influence over this. He has not has really tried to change those policies because he has put all his eggs in the nuclear negotiation basket. He is very focused on the foreign-policy front," Ghaemi said. The deadline for a nuclear deal has been recently shifted to March 2015. Internet policy may come later.