TEHRAN  Iranian officials stepped up efforts to crush the remaining resistance to a disputed presidential election on Wednesday, as security forces overwhelmed a small group of protesters with brutal beatings, tear gas and gunshots in the air. Intelligence agents shut down an office of a defeated presidential candidate, saying it was a “headquarters for a psychological war.”

The nation’s leadership cast anyone refusing to accept the results of the race as an enemy of the state. Analysts suggested that the unyielding response showed that Iran’s leaders, backed by the supreme leader, Ayatollah Ali Khamenei, had lost patience and that Iran was now, more than ever, a state guided not by clerics of the revolution but by a powerful military and security apparatus.

President Mahmoud Ahmadinejad has maintained a low profile, but evidence suggests that he has filled security agencies with crucial allies.

“What has been going on since 2005 is the shift of the center of power from the clergy to the Pasdaran,” or the Islamic Revolutionary Guards Corps, said a political analyst with years of experience in Iran who feared retribution if identified. “In a way one could say that Iran is no longer a theocracy, but a government headed by military chiefs.”