From a U.S. Embassy rooftop, as tracer fire lit the skies over Somalia on New Year's Eve 1990, Karen Aguilar and some Foreign Service friends broke into a bittersweet chorus of "Amazing Grace." Then someone opened fire on the astonished diplomats.

Civil war had reached the Somali capital much faster than anyone predicted. Clearly it was time to leave, but lethal anarchy trapped the Americans in their chancery. Heavy machine gun fire and rocket-propelled grenades began tearing into the embassy compound. Artillery shells pounded nearby neighborhoods. Armed looters tried to breach the embassy walls."This was not the distant sound of gunfire," Aguilar recalled recently. The career Foreign Service officer still carries in her purse a .50 caliber machine gun round that drilled into a garden where she was standing.

"We couldn't save ourselves. Either we were going to get blown away or somebody was going to have to save us," she said.

A year ago, someone did. A small contingent of Marines and Navy SEALS arrived by helicopter after a harrowing night flight that they twice came close to aborting. They touched down just as Somali soldiers wielding AK-47 rifles mounted ladders outside the embassy's 10-foot walls.

Among the 281 people they plucked from the U.S. Embassy were Soviet Ambassador Vladimir Korneev, British Ambassador Ian McCluney and 10 other chiefs of mission. Within hours there was a 282nd evacuee: the wife of Sudanese Ambassador Mustafa Hassan Ahmed gave birth upon arrival aboard the amphibious assault ship USS Guam.

Participants recall the rescue, which the Pentagon dubbed "Eastern Exit," as one of the riskiest evacuations in U.S. diplomatic history. It was little noticed at the time because the Persian Gulf war, then less than two weeks away, commanded the headlines. The Marines call it a NEO - non-combatant evacuation operation - and said it is a model for the kind of short-notice contingency they expect to address increasingly often now that the Cold War is over - although the Somali conflict, which continues today, was not fueled by superpower rivalry.

The rescue mission succeeded on the slenderest of margins. Requiring two unprecedented air refuelings over open sea at night, a pair of heavy-lift CH-53E Super Stallion helicopters carrying nine SEALS and 51 Marines nearly turned back when the first refueling attempt doused everyone inside the lead aircraft with jet fuel. After a surface-to-air missile site was discovered on the Somali coast, the mission also came close to being aborted.

Heavily outgunned and outnumbered, according to Marine Lt. Col. Willard D. Oates, the 60 U.S. troops could not have held the embassy against concerted attack. "We would just be overrun," he said.

When a grenade-wielding Somali major told U.S. Ambassador James K. Bishop that he would shoot down any helicopter that tried to leave, Bishop dissuaded him with all the cash he could find and the keys to his ambassadorial limousine.

Military records and interviews with participants portrayed the embassy's final days as a surreal blend of luxury and terror.

With non-essential personnel already gone, the embassy was down to 36 Americans. But there were as many as 800 meals served each day because the compound swelled with foreign diplomats seeking refuge. The Americans quickly exhausted their emergency stocks of rice, canned vegetables and paper plates and broke out their last frozen delicacies for the final hours.

The Marines arrived to find them microwaving orange-glazed duck on crested ambassadorial china. Aguilar said she offered one young SEAL a plateful of rock Cornish game hen. She said he told her he'd rather not "go into combat with a baby chicken in my stomach."

With war only days away in the Persian Gulf, the U.S. Central Command was reluctant to spare combat troops and equipment for the rescue. Senior generals and admirals considered and rejected proposals to send a destroyer for naval gunfire support or a tank-carrying amphibious ship on the 1,600-mile voyage from the Gulf of Oman to Somalia.

Instead, the USS Guam and the amphibious transport dock USS Trenton sailed alone, with two squadrons of CH-46 Sea Knight helicopters and a pair of longer-range Super Stallions. Learning that Bishop had cabled Washington that his circumstances were desperate, Marine Col. J.J. Doyle decided to launch his helicopters from the unprecedented distance of 466 miles off shore.

After a sea-skimming flight of 41/2 hours, during which crews used night-vision goggles to navigate, the first helicopters landed at 6:10 a.m. on Jan. 5. The nine SEALS, led by Cmdr. Stephen R. Luoma, ran in a vee formation toward the inner chancery, while two platoons of Marines led by Lt. Col. R.P. McAleer drove the ladder-mounted intruders away from the walled perimeter.

The Navy's Atlantic Command ordered Luoma not to discuss the operation except in a conference call monitored by Navy public affairs. The Washington Post declined to accept that condition. The Marine Corps imposed no such requirement on its troops.

The arrival of U.S. troops was sudden and frightening, according to Aguilar, even for the diplomats they sought to rescue.

"They must have been carrying 200 pounds of equipment, they looked about 7 feet tall, and on every inch of their bodies they had this terrible paint," she said. "They looked ugly. They looked mean. They looked like swamp creatures."

Soon a second group of Somalis arrived at the embassy gate, unaware of the U.S. troops inside.

"They told our perimeter guard to open up or we'll blow you away and then they looked up and saw the Marines on the roof with these really big guns and they said in Somali, `Igaralli ahow,' which means, `Excuse me, I didn't mean it, my mistake,' " Aguilar said.

But other Somalis opened fire on the Marines. Bishop gave them strict orders not to return fire without his command.

By 7 a.m., the two Super Stallions took off with the first 60 evacuees - mainly women, children and high-ranking foreign diplomats - for the return flight to the Guam. The 60 U.S. troops remained behind for security, which had been provided by locally hired guards under the direction of a Scottish mercenary. The mercenary was evacuated with the diplomats.

As the Guam and Trenton steamed to within 15 miles of the coastline, they planned to send waves of shorter-range Sea Knight helicopters in the afternoon. But the helicopters' vulnerability to the intense fire around the embassy led to a change of plan: the helicopters waited until nightfall.

Oates said the Somali major arrived, grenade in hand, to greet the Sea Knights when they landed around midnight, threatening to destroy them with surface-to-air missiles if they took off again.

"That got our attention, and our pucker factor went way up," Oates said, using a Marine expression for anxiety.

Shortly after the evacuation was completed - according to reports from Mogadishu corroborated by amateur snapshot - armed looters gained entry to the chancery and took everything of value they could find. When they came to the inner vault, where the diplomats planned to hide if their rescuers did not arrive in time, the looters destroyed it with rocket-propelled grenades.

The photographs show nothing but blackened rubble where the diplomats would have been.