Shadowy figures crept like cat burglars across the back roof of the row of elegant townhouses facing Hyde Park shortly before 7:30 p.m. yesterday. Below them, leaders of the five or six gunmen holding nearly 20 hostages in the Iranian Embassy were huddled around the phone on the second floor.

The line was open, and the gunmen were conversing among themselves about what to say next to police negotiators outside. After executing two hostages and then pushing one of the bodies out the front door to prove they were not bluffing, the gunmen believed they had forced British authorities to negotiate their safe passage out of the country to end the embassy siege.

But the apparent change of heart by police officials, who had earlier rejected this final demand by the ethnic Arab Iranian gunmen, was only a ploy to camouflage a dramatic last-ditch effort to forcibly rescue the rest of the hostages. British Army antiterrorists commando, so secret that their identities and commanders are not known to outsiders, already had been ordered to storm the embassy.

With just 10 minutes' warning, the small teams of Special Air Services commandos silently sprung into action from townhouses adjoining the embassy to begin a carefully worked out and exactingly timed plan.

The commandos were clad in black and wore hoods and gas masks containing two-way radio transmitters that kept them in constant contact with each other. They carried compact, sophisticated automatic rifles and pistols, plus British-designed SAS "stun grenades" designed to produce loud concussions and brilliant flashes that can blind and disorient people for several seconds without permanently injuring them.

Using ropes anchored on chimneys, the four to six commandos on the roof lowered themselves down the back of the five-story townhouse. At the prearranged moment, they suddenly threw grenades through the back windows of the upper floors of the embassy and jumped in after them.

A much more massive explosion shook the building.

Another team of commandos may have blasted their way into the embassy from one of the adjoining townhouses. British officials, who are determined to keep the SAS commandos' methods secret, today would neither confirm nor deny that this was done.

During the last few minutes before the raid, one of the hostages, British Broadcasting Corp. news technician Simeon Harris, was taken by the leader of the gunmen down to the second floor and shown a wall that appeared to be bulging in. Harris said tonight he told the gunman he was seeing things, although Harris said he had no doubt that "the walls had started to bulge" and "strange noises" could be heard from the adjoining townhouses.

Most of the hostages were being held on the second and third floors, guarded by two or three of the gunmen. When one of the gunmen managed to take aim at an SAS commando coming through a window, according to several reliable versions of the assault, one of the hostages, British police constable Trevor Lock, tackled the gunman, who was shot dead by the commando.

In front of the embassy, in full view of a BBC television camera broadcasting the drama live to millions of startled British viewers, two more black-clad commandos jumped onto the embassy's second-floor terrace. They placed a large ring of explosives, resembling a child's saucer sled, against the embassy's second floor windows and scampered quickly back onto the adjoining terrace.

Another enormous explosion blasted billowing dark smoke and bright orange flames out of the second story of the embassy. Debris, paper and furniture, which the gunmen had piled in case they carried through their threat to burn down the embassy, were set ablaze in a fire that eventually gutted the building, collapsing its roof and several floors.

Immediately after this second blast, a team of four commandos from the adjoining townhouse jumped through the smoke into the burning second floor of the embassy. They rushed past Harris, who had been on that floor with the leader of the gunmen when the raid began and had escaped into an empty front room.

He said tonight he crawled through a front window to the terrace, where he was ordered by a commando nearby to get down.

"I'm going to burn to death," Harris said he shouted.

"Get flat, get flat," the hooded commando, who first appeared to Harris to be "a frogman," shouted back. Finally, seconds later, the hooded commando signaled Harris to climb over to the adjoining terrace and inside to safety.

Commandos swarming through the embassy chased most of the panicked gunmen downstairs away from the hostages, as they had planned. In a gunbattle lasting 30 minutes, and apparently ending in the basement, the commandos killed at least three gunmen on the spot.

Another mortally wounded gunman died o the way to a nearby hospital. And police officials said today that they believe they may eventually find the body of a fifth gunman in the smoldering ruins of the embassy.

Harris said tonight that the only surviving gunman, a good-looking young man," had tried to infiltrate the fleeing hostages. But he said the SAS commandos had anticipated this possibility in the way they evacuated the hostages.

"We were not shown out of the building," Harris said tonight. "The SAS threw us out of that building. They threw us from one man to the next in a chain . . . down the stairs, out the back."

The hooded commandos then took the precaution of tying the hostages' hands and ordering them to lie face down while each person's identity was checked.

"I had straps round my wrists. They searched me, held me down and told me not to say a word," Harris said. "At one point I noticed the problem I think the SAS had feared, that they would mix up the hostages with the terrorists."

Harris immediately recognized a young man near him as one of the gunmen who guarded the hostages in a large back room on the embassy's second floor, where the women were separated from the men by a long row of filing cabinets.

"Some of the female hostages told the SAS that he was a nice boy, but they wouldn't identify him as a terrorist," Harris said. "I shouted out: 'there is no doubt he is a terrorist.'"

After the gunman was seized and other identifications were completed, the commandos freed the hostages and allowed police to guide them around the block of townhouses to ambulances.

Three Iranian hostages, including the embassy's charge d'affaires, Gholam-Ali Afrooz, were seriously wounded in cross fire between the commandos and gunmen. They are being treated in a nearby hospital where their condition is currently not considered critical.

The hostage whose body was pushed outside by the gunmen was the embassy's press attache, Abbas Levasani, 25. Police believe one of the bodies found inside the embassy will be the embassy's military attache, also believed to be executed by the gunmen.

But police officials said tonight it will take days of painstaking searches through the rubble to determine who perished, and how, and exactly how many hostages and gunmen there were. Surviving hostages are still being questioned by police to try to piece together precisely who the gunmen were, where they got their weapons and whether they had been directed by someone outside.

Declaring that they were Arab Iranians from Khuzestan, the gunmen originally demanded the release of 91 Arab militants imprisoned in Iran. They had dropped this demand by yesterday, when they were demanding only safe passage out of Britain.

Because of Iraq's open support of other Arab minority rebels in the oil-rich Khuzestan Province of southwestern Iran on the Iraqi border, officials are investigating whether the seizure was a part of wider international intrigue in which diplomats stationed here may have played a role.

Police officers here acknowledge today that they had accumulated undisclosed information about the gunmen from sophisticated electronic and photographic eavesdropping devices trained on the embassy from the adjoining townhouses. This intelligence plus information from five hostages released during the first five days of the siege also helped the SAS commandos determine precisely where the gunmen and hostages were likely to be when the commandos stormed the embassy.

The commandos reportedly rehearsed their raid at a mockup of the key embassy rooms in a north London neighborhood where they were temporarily billeted during the siege. The commandos also regularly rehearse hostage-freeing raids at their tightly secured base in the English countryside.

Formed during World War II to inflict as much damage as possible in daring raids behind enemy lines, the elite SAS regiment has been most active in recent years combating terrorism in Northern Ireland and advising British police and foreign governments in other hostage cases. This is the first hostage -- freeing assault the SAS commandos have made themselves. t