Street clashes between student protesters and security forces backed by Islamic militiamen raged through Tehran for the sixth straight day in a growing confrontation over President Mohammed Khatemi's attempt to transform revolutionary Iran into a more liberal society governed by the rule of law.

Defying a ban on public gatherings issued Monday, about 10,000 people rallied in downtown Tehran yesterday, shouting slogans and shaking their fists in scenes reminiscent of the uprising against the Shah 20 years ago. The demonstrators were dispersed by police and security men who fired weapons into the air, lobbed tear gas into the crowd and beat several protesters with batons, according to news service reports from the Iranian capital. As they receded through the city, the protesters set at least two vehicles on fire.

Apparently fearing a reaction by his adversaries among Iran's clerical conservatives, Khatemi went on television to warn that the protests have degenerated into rioting led by people with "evil aims," jeopardizing national security and the liberalizing reforms he has put into motion since his election in 1997.

"They intend to foster violence in society, and we shall stand in their way," Khatemi said of the protest leaders. "We take the security of our country and our citizens very seriously."

Defense Minister Ali Shamkhami also cautioned against any new disturbances, telling state television late yesterday: "We will enforce security at any price."

The protesters dispersed by the end of the day, news service reports said, leaving the streets to security forces and Islamic fundamentalist vigilante squads armed with automatic weapons. But despite the appeal for calm, supporters of Khatemi -- including professional associations and moderate members of the Iranian parliament -- called on citizens to gather at Tehran University today to show solidarity with the students and "to stand up for their fundamental rights." Conservative Islamic groups called for a rival demonstration to denounce the demonstrations.

Thus far, neither Khatemi, whom the demonstrators ostensibly support, nor Ayatollah Ali Khamenei, the country's supreme leader and conservative stalwart, has proved capable of persuading the protesters to stop their daily gatherings -- or of capitalizing on the protests to enhance his authority at the expense of his rival. Both have called several times for calm, Khatemi in a statement emphasizing support for free speech on Iranian campuses and Khamenei in remarks accusing the United States of stirring up trouble.

"Our main enemies in spying networks are the designers of these plots," Khamenei said in remarks reprinted in yesterday's Tehran Times. "Where is the money allocated by the U.S. Congress to campaign against the Islamic Republic of Iran spent? No doubt . . . that a sum several times this budget is spent on such schemes."

Previous, smaller scale political clashes between those who want a more open Iran and those who want to sustain the harder-line, religion-based system created by Ayatollah Ruhollah Khomeini have generally ended with Khatemi's gaining further control of the government and pushing ahead with reforms.

With events moving so quickly, and with discontent so widespread, however, analysts say that the outcome of the current protests can not be predicted. On one hand, they could generate a security crackdown and lead to more conservative control under Khamenei's leadership. On the other, they could strengthen Khatemi's steady but incremental efforts to mitigate Iran's largely theocratic system -- perhaps even forcing him to move more quickly to keep up with popular demands.

The protests have elicited great interest in Washington, where administration officials welcomed Khatemi's landslide election two years ago as a potential turning point that could lead to better relations between the two countries. But U.S. officials said yesterday that they have little insight into the present situation, as the United States has not had an embassy in Tehran since the 1979 revolution. Officials here also expressed the fear that too many statements from Washington in support of the students would be used by hard-liners to discredit the protesters.

At his regular briefing, State Department spokesman James P. Rubin said the protests "represent the desire for political change on the part of the younger generation seeking the rule of law and freedom of expression, and that is significant and serious." He added: "We have made it clear that we are concerned by the use of violence to put down demonstrations by Iranian students in support of freedom of expression and democratic values and the rule of law."

The protests, which have left two dead by the official count, began in reaction to a violent police raid on a Tehran University dormitory last week. But they spread quickly to several other cities and broadened into an outcry of frustration with a social and political order that imposes a strict dress code on women, prohibits many forms of public entertainment and interaction and considers its supreme leader a nearly infallible guardian of the nation and of Shiite Islam.

The disorders are among the largest there since 1979, and have included rare public criticism of Khamenei and of the system that makes him preeminent over the democratically chosen Khatemi. "Khamenei, shame on you. Give up the leadership," the protesters chanted, according to reports from Tehran. "The struggle has begun. Twenty years of silence have ended."

Khamenei controls the defense and security forces that have become the target of public anger because of the dormitory raid -- itself a response to a much smaller student protest of the closing of a liberal newspaper -- and because of their apparent collaboration with the quasi-official militia groups that enforce religious restrictions on public behavior.

Although the recent protests represent the most volatile and widespread clash between the country's competing political forces, it is not the first. Since Khatemi's election, conservative politicians have moved to impeach his allies in parliament and disqualify them from running for municipal offices. They have tried to push back press freedoms inaugurated by Khatemi and, in incidents that gripped Tehran last fall, their security forces killed writers and academics who supported open speech and Khatemi's drive for secular reform.

In each of those previous battles, the widely popular Khatemi not only emerged victorious, but was seemingly able to consolidate control over larger portions of the government and society. The killings, for example, rather than creating instability, led to the resignation of the interior minister and the arrest of several security agents.

His success thus far has led to a nearly global reassessment of Iran. Many governments no longer regard it solely as a revolutionary state bent on exporting Islamic revolution but rather express willingness to envision it as capable of internal reform and normal foreign relations.

Britain, for example, recently restored diplomatic relations with Tehran. Saudi Arabia has opened discussions with Iran in hopes of overcoming long-standing suspicions between the Persian nation and the Arab world. The United States, reviled for years in Iran as the "Great Satan" and hated for its support of the Shah, has modified its policies as well, clearing the way for grain and pharmaceutical exports there and softening its description of Iran as a country that sponsors terrorism.

Even Israel, still slated for extinction in Iran's official foreign policy, has become less harsh in its attitude toward the Islamic government. Over the last two years, Israeli officials have stopped regarding Iran as an "enemy" and instead consider its policies a "threat" -- a change meant to emphasize that Israel has no quarrel with the Iranian people despite support that hard-line factions have given to militant anti-Israeli groups in Lebanon.

CAPTION: A protester throws a stone at police near Tehran University, where students rallied to demand reform of policies backed by religious conservatives.