A moderate challenger to hardline President Mahmoud Ahmadinejad condemned the authorities on Monday for blocking access to the Facebook social networking site ahead of the June 12 presidential election.

With the Internet playing a mounting role in political debate, authorities have curbed access to political, human rights and news websites, and blocked Facebook on Saturday.

Former parliament speaker Mehdi Karoubi said websites should be tolerated at "such a sensitive political period."

"It (Facebook) was filtered by the authorities because of moral issues. But filtering Facebook just days before the election was wrong," Karoubi told a news conference.

Reformists say by blocking websites the government wants to force Iranians to rely on the state-run media, which they accuse of giving biased coverage in favor of Ahmadinejad.

• Click here for FOXNews.com's Personal Technology Center.

• Got tech questions? Ask our experts at FoxNews.com's Tech Q&A.

Ahmadinejad is in a four-way race against two moderate candidates and former head of the Revolutionary Guards Mohsen Rezaei.

Websites like Facebook have become an important campaign instrument for moderate candidates, particularly former premier Mirhossein Mousavi, who want to mobilize Iranian youth to vote out Ahmadinejad.

One Facebook page campaigning for Mousavi had more than 5,200 members.

Iran's judiciary said last year more than five million websites were being blocked by authorities since they "inflict social, political, economic and moral damage, which is worrying."

More than 150,000 of Iran's population are Facebook members and young voters make up a huge bloc — which helped former reformist president Mohammad Khatami to win the election in 1997 and 2001. Khatami backs Mousavi's candidacy.

Text messaging also has become an integral part of the campaign and has sparked a formal complaint from hardline backers of Ahmadinejad, who is bearing the brunt of sometimes rude jokes.

"You can not change the driver (the president) of a crashing car (Iran)," read one message. The text messages normally end with a note to send them on to 20 friends.

The official IRNA news agency said Tehran's conservative prosecutor's office would crack down on messages that offended candidates.

The messages are unlikely to penetrate deep into Ahmadinejad's support base among the pious poor.