Encircled by wind-whipped flags and a vista of white grave-markers at Arlington National Cemetery, President Carter yesterday led an emotional official tribute to the eight American commandos killed in the aborted mission to rescue hostages in Iran.

"For the men we honor here today, duty required both daring and quiet courage," Carter told an audience of several thousand who spilled out of the amphitheater.

"They were willing to face the relentless desert and the angry mobs to free fellow Americans who can be accused of nothing more than doing their duty in a hostile place," he said.

The president's repeated evocations of "that dark desert night" contrasted sharply with the sparkling dome of blue sky at Arlington yesterday, the bright colors of military uniforms and brass band instruments.

Some relatives of the dead quietly broke into tears, now and then, as did others in the crowd, including a cornet player in the band. Some of the smaller children, whose fathers had been killed, fidgeted and yawned but placed hands over their hearts when Taps was played and at other appropriate moments in the ceremony.

In the silence after the final notes of Taps had faded, the crowd audibly caught its breath as six Air Force T-38 Talon jets streaked out of the east at about 1,000 feet, in tight formation.

In the split second when the team -- known as the Thunderbirds -- was over the amphitheater, one pilot pulled his plane abruptly out of the formation and soared straight up into the blue sky, leaving an empty space -- symbol of a fallen comrade. Only then did the roar of their engines catch up with them, like applause.

After the Air Force's Singing Sergeants finished an especially spirited old-time gospel rendition of the hymn, "Take My Hand, Precious Lord," President Carter walking to the podium, smiled broadly at the lead singer and said, "It's difficult not to say -- amen."

Carter delivered the eulogy just before departing for Philadelphia on his first speaking appearance outside Washington since Nov. 4, when the 53 hostages were taken.

He had announced that he now could afford to leave his self-imposed exile in the Rose Garden because the nation's problems had become more manageable, and indicated that his preoccupation with the hostage crisis is ending.

At the service, his words, like the military trappings, emphasized patriotic traditions of duty and honor rather than grief.

And Carter once again made it clear that, while saddened by the deaths, he does not regret attempting the rescue mission.

Describing a private meeting with the families of the dead men just before the service began, Carter said, "When I approached the meeting . . . I did it with some degree of concern and trepidation. But as I approached them every one and we put our arms around each other, invariably they said, "God bless you, Mr. President . . ."

To the wives, children, parents and other relatives of the dead, and also the injured, Carter extended "the sympathy of a proud and grateful nation.

"Your risk, your suffering, your loss are not in vain," he told them. "I fervently pray that those who are held hostage will be freed without more bloodshed, that all who would use terror to imperil innocent people will see the cruel futility of their criminal acts."

The charred remains of the eight Marine and Air Force men are still at Dover Air Force Base, Del., where morticians are just completing final identification. None of the families has requested burial at Arlington, according to a Pentagon spokesman.

The men were killed, after the mission had been halted, in fiery collision of a helicopter and a transport plane. The accident took place at a desert landing strip 200 miles from Tehran.

Among the dignitaries at the rites were new Secretary of State Edmund S. Muskie and his wife, Secretary of Defense Harold Brown, the Joint Chiefs of Staff and other top military officials, Veterans Administration chief Max Cleland, Chief Justic Warren E. Burger, Sen. Edward M. Kennedy and other members of the House and Senate. Rosalyn Carter sat somberly in the box with the defense secretary.

Some of the surviving members of the commando team were also in the crowd.

Noting the generous turnout of uniformed personnel, a Navy officer said, "We were especially anxious to pay this tribute because of the very disturbing indignities that the families of the deceased experienced. Our hearts just went out to them."

He was referring to the abusive treatment of the bodies by Iranian leaders before they agreed to return them to the United States.

The eight men killed were: Air Force Capt. Richard L. Bakke, 34, of Long Beach, Calif., Marine Sgt. John Davis Harvey, 21, of Roanoke, Va., Marine Cpt. George N. Homes Jr., Pine Bluff, Ark.; Marine Staff Sgt. Dewey L. Johnson, 32, East Dublin, Ga.; Air Force Capt. Harold L. Lewis, 35, Mansfield, Conn.; Air Force Tech Sgt. Joel C. Mayo, 34, of Bonifay, Fla.; Air Force Capt. Lyn Davis McIntosh, 34, of Valdosta, Ga., and Air Force Capt. Charles T. McMillian II, 28, of Corryton, Tenn.

Carter called the men's first names, referred to all of their home towns and noted that two came from his own home state of Georgia. They had all volunteered for the mission.

"Like those who have gone before," he said, "these young men died to keep the ancient dream of human liberty alive."

It was especially appropriate to honor the men at Arlington, the president said, where Americans "have long paid tribute to those who died for our country . . . ."

The rolling green hills of Arling once belonged to Robert E. lee, Carter noted, drawing a comparison with the southern Civil War general. "Like these eight men, he was a soldier" committed to "a life of service that often meant hardship, loneliness and long separation from all that he most loved."

These eight men had subscribed to "that austere and honorable creed" expressed by Lee in words written to his son, Carter said: "Dusty is the sublimest word in our language. Do your duty in all things. You cannot do more. You should never wish to do less."

As the crowd filed out of the amphitheater after the service, the Marine Band broke into a verson of the Marine anthem (without its famous words, "From the halls of Montezuma, to the shores of Tripoli . . ."). They started in a funeral minor key, but at the end they transmuted into a lilting march step in a major key, with bells.