The joy of Iran’s Facebook and Twitter fans was short-lived as authorities on Tuesday restored blocks on social networks after filters were lifted for several hours overnight.

The brief access was a “technical glitch” that was quickly rectified, according to communications official Abdolsamad Khoramabadi, from the board overseeing Internet in Iran.

But it could also point to increasing internal struggles between groups seeking to reopen Facebook and other social networking sites, and hard-liners in the Iranian establishment, who remain firmly in control of Internet access.

Many Facebook and Twitter followers in the capital, Tehran, and other Iranian cities assumed the surprise Internet freedoms late on Monday were the result of policies by newly-elected President Hasan Rouhani, who has pledged more outreach to the West and a new openness in Iran.

Scores of Facebook users posted notes of “Rouhani, Mochakerim,” which is Farsi for “Thank you, Rouhani.”

“God liberated Facebook,” wrote Mohammad Reza on his Facebook, adding that it was his happiest time ever.

The postings quickly subdued when reality struck and the sites were no longer available on Tuesday morning, forcing Iranian Internet users to again have to go through proxy servers for access.

The semi-official Mehr news agency quoted Mr. Khoramabadi, the communications official, as saying that board members were unclear as to what had caused the “technical failure regarding some Internet service providers.” He warned of unspecified measures if it turns out to have been an international move against Iran.

“We will take action if there was a human flaw,” said Mr. Khoramabadi. “We are probing it.”

Some Internet users raised other suspicions.

Amir Reza wrote on his page that the brief access was a trick by Iran’s cyber police to trace Iranian users of Facebook.

Iran has blocked Facebook, Twitter and other social networks after they were widely used by Opposition supporters during mass street protests following the disputed 2009 re-election of Mr. Rouhani’s predecessor, Mahmoud Ahmadinejad.

Several members of Mr. Rouhani’s Cabinet now have their own Facebook pages but there are internal tensions among Iran’s leadership over whether the Internet is ultimately a force to be expanded or best kept tightly controlled.

Disputes have even broken out on Web-based Iranian news sites over the authenticity of some of the Facebook pages linked to some Ministers.