Today, Iran belonged to the revolution.

After a seemingly endless night of ear-splitting gunfire and some bloody clashes in east Tehran, one of the world's best equipped armies capitulated to a few thousand determined street fighters, and it was time for the millions who had opposed the shah's rule to celebrate.

Iran's capital almost went berserk when, at 1:45 p.m., the radios suddenly crackled with the news: The Army high command was ordering all its units back to the bases and it would play a neutral role in the political struggle.

Iranians immediately grasped the significance of that announcement. The revolution was won.

Just 11 days after returning from exile, Ayatollah Ruhollah Khomeini, the white-bearded, 78-year-old symbol of the struggle who had said it was inevitable that the will of the revolution would be fulfilled, was proved right.

The fall of Prime Minister Shahpour Bakhtiar and the creation of the new republic of Iran would almost be anticlimactic after the Army's surrender. The instant the brief announcement finished, automobile lights flashed on everywhere. Cars raced wildly through the streets in a cacophony of horn-honking.

Pedestrians lined the streets and waved V-for-victory signs at passing cars. Office workers and shopkeepers abandoned their posts and filled the streets, shouting and waving. Some cried unashamedly.

Even Westerners, who have become accustomed to xenophobic animosity, were smiled at for a change. If they waved the V-sign, they felt almost adored in the flush of euphoria.

For the first time in more than 24 hours, shooting stopped -- for the moment -- and truckloads of young revolutionaries paraded through downtown Tehran, waving their automatic rifles triumphantly. The youths were accorded a hero's welcome by Iranians from all walks of life -- middle class, working class, young, old, religious, secular.

The guerrillas, most lof them wearing white head bands signifying willingness to become martyrs, occasionally fired bursts from automatic rifles into the air, to the delight of the spectators.

Young street fighters clambered over a captured Iranian Army tank near the Eshratabad military compound in east Tehran, shouting advice through a porthole to a comrade trying to start the machine. Businessmen in three-piece suits ran into the streets near Tehran University to halt traffic so a captured armored car could turn around and join the celebration parade.

The celebrations seemed precipitous, considering it was only three hours since the guerrillas had finished laying siege to a huge police and Army compound at Eshratabad and had captured it with all its weapons.

As if they were spectators at a mock war exercise, hundreds of people lined the streets surrounding Eshratabad during the siege, watching guerrillas pour rifle fire into the downtown base, occasionally flattening themselves against the walls or ducking into doorways when the firing came too close.

Billows of black smoke from a burning Army building darkened the sky, and the spectators applauded as truck-loads of gun-wielding fighters were brought in as replacements.

Eventually, the police capitulated, opened the gates and invited the guerrillas to carry off the weapons stores.

Outside, youths begged onlookers for clothing so that deserting soldiers could disguise themselves. Many defecting soldiers and airmen wore white kerchiefs over their faces. Those who did not menaced news photographers who attempted to take their photographs.

Later in the day, as celebrations of the Army's withdrawal wound down, suspicions of a trick began to play on the minds of the guerrillas, and their mood shifted. Rumors spread that Army units loyal to Shah Mohammad Reza Pahlavi were forming outside the city for an assault on the opposition.

On Shah Reza Avenue, members of the Mujahedeen guerrilla organization waved rifles and machetes at passers-by and warned them to get off the street before the rumored attack started.

A youth with a Browning automatic rifle crouched behind a barricade at 24 Esfahand Square, oblivious to the victory parade elsewhere in the city and seemingly prepared for imminent battle.

"The announcement is a trick, and you would know it if you knew how evil the Army is," said a well-dressed man near the university's main gate, through which passed a stream of captured trucks with the markings of the Javidan, the elite division of the Imperial Guards.

Everywhere, the crackle of gunifire echoed off of office buildings, as nervous youths squeezed off rounds in the air or at imaginary targets as if their ammunition supply were inexhaustible.

Indeed, supplies seemed almost without limit at the complex of former schools where Khomeini makes his headquarters. An enormous mound of unassembled Army weapons looted from captured arsenals covered part of a dirt parking lot. Thousands of street fighters clawed at the pile as if they were at a rummage sale. Youths were running off with armfuls of rifle parts, apparently unconcerned whether they matched or whether they had a complete set.

In a labyrinth of narrow alleys linking the Khomeini offices, weapons were being passed out to anybody who could produce an Army discharge card as proof of competence, and to some who could not. A small boy, about 10 years old, proudly displayed an Army flare gun.

Wooden crates filled with rifles were being torn open on the backs of trucks. Khomeini's press center -- normally the scene of rhetoric-laden news conferences -- had been turned into an armory.

Reporters were not allowed inside. But through the door a brown-robed mullah, or Islamic priest, could be seen passing out Iranian Army G3 automatic rifles.

Gun-wielding columns of guerrillas occasionally paraded in captured troops and policemen with terrified looks on their faces. The prisoners were taken to makeshift lockups to await a fate their captors were unable to predict.

News of victory upon victory spread like wildfire through the crowds: the capture of Gulestan Palace, one of the shah's lavish homes; the lower house of parliament abandoned by the Army, which posted signs saying, "We join the people"; capture of the state-run radio and television; capture of most of Tehran's 23 police stations; 12 captured tanks; and the humiliating defeat of the elite Javidan "Immortals" unit of the Imperial Guard by a contingent of rebellious Air Force cadets and guerrillas.

Predictably, the time came for score setting. It began tonight as hundreds of trucks, vans, cars and even commandeered fire engines roared out of the Khomeini compounds with 5,000 armed men on their way to the Jamshidiyeh military prison with machine guns, mortars and antitank guns.

Their mission was to break in and capture the hated former prime minister, Amir Abbas Hoveyda, and the former SAVAK head, Gen. Nematollah Nassiri, both in prison on corruption charges.

Heavy fighting was heard after the martial law curfew in the vicinity of the prison. But the attackers reportedly called off the assault after an appeal from their leaders.