At the Australian embassy yesterday afternoon, the staff got the good news from Australian TV that was monitored on an open line in the top-secret "Command" section of the building.

"We did it! We did it!" shouted one woman jumping up and down as she heard of Australia II's splashing defeat of Liberty in the most suspense-filled America's Cup race yet. In the embassy's lobby, the phone was ringing constantly, mostly with Americans phoning in congratulations.

The fest soon moved one block away to Mortimers bar, where the ebullient Australians celebrated their hard-won victory in Newport, R.I., in their customary understated way--with beer, cheers and choruses of "Waltzing Matilda."

"I feel like the Romans did when they heard about the death of Hannibal--absolutely ecstatic," said Ian Bridge, an Australian World Bank employe.

"I'm sure you couldn't have thought of a country you'd rather lose to," said political counselor Robert Gordon as he tried to get past the crowd at the bar. "We're sending the bar bill to the New York Yacht Club," he added.

The hardy Australians, who call their Friday afternoon drinking sessions "Prayers," were bouncing green and gold balloons, waving miniature Koala bears as well as bending their elbows to hail what one of them called "a victory for the underdog."

"The Australian folk hero is the little Aussie 'battler,' " explained legal counselor David Edwards. "That we struggled to come from behind--this is what the working man at home will admire. That's what Australians admire most," he said.

But in the self-congratulation there were also plaudits for the losers. "The Americans put up a good fight--it would not have been such a great race if they hadn't done so well," said Barbara Morris, an embassy supply officer.

By this time, Aussies had crowded out almost everybody else from the bar. But in the middle of the room, two Americans visiting from Houston sat at a table surrounded by the whooping celebrants. They looked quite vulnerable as they nibbled on their popcorn.

"We're the losers," said Susan Midyett. "But with all due respect, it's nice to see some competition for a change, it really is," said her friend Lee Beckett.

In fact, Australians here said yesterday they feel they've won the America's Cup for the rest of the world by wrenching it from the grip of the New York Yacht Club. "All sailing nations should be happy--now they won't be up against the New York Yacht Club," said one merrymaker. When future challengers arrive in Australian waters in search of the Cup, "they will only have to sail down there," he added.

Earlier, a knot of Australians watching the final seconds of the race on television erupted in laughter when the commentator remarked how the New York Yacht Club thought of the America's Cup as "sort of the like the Declaration of Independence." And just as unexportable.

Australia's ambassador, Sir Robert Cotton, and national treasurer, Paul Keating, who was in town for the International Monetary Conference, were both representing Australia in Newport yesterday, embassy officials said.