The United States and its five major allies agreed here to seek United Nations action as soon as possible against the Soviet Union's invasion of Afghanistan, which they characterized as "naked aggression."

After a hastily arranged, six-hour meeting here with senior diplomatic representatives of Britain, West Germany, France, Italy and Canada, U.S. Deputy Secretary of State Warren Christopher said they agreed to bring "this flagrant violation of international law" to the attention of the U.N.

Other diplomatic sources said the six countries' U.N. representatives would seek a Security Council resolution or other action condemning last Thursday's Soviet-backed coup in Afghanistan and the invasion of tens of thousands of heavily armed Soviet troops to put down Afghan Army resistance and fight rebel Moslem tribesmen in the rugged country on the Soviet Union's southern border.

The six allies also agreed today to review their whole range of relations with the Soviet Union and Afghanistan to find other ways to apply diplomatic pressure. They also will look for ways to aid other countries near Afghanistan, particularly neighboring Pakistan, "to ensure they maintain their independence."

Diplomatic sources would not reveal, however, whether any of the other allies will join the U.S. in trying to provide emergency military aid to Pakistan. Nor would they say whether the allies discussed the possibility of aiding the Moslem Afghan rebels, many of whom are based just across the border in Pakistan.

Deputy Secretary of State Christopher, who flew here last night for today's talks, left immediately after wards for Brussels, where he will hold similar consultations with the rest of the NATO allies at an emergency sessions of the North Atlantic Council on New Year's Day.

Today's talks, hosted at the Foreign Office here by Britain's Deputy Foreign Secretary Douglas Hurd, was intended by the U.S. to dramatize and coordinate Western reaction to the invasion of Afghanistan, the Soviet Union's largest military operation since its invasion of Czechoslovakia in 1968.

Christopher said "there was a wide measure of agreement" that "the Soviet intervention in Afghanistan is a naked agression." The Attempt by the Soviets "to put clothes on their action" by claiming their military assistance was sought by the new Afghan regime, he added, "seems to us to be totally unconvincing."

"I found a wide measure of support," Christopher told reporters, for the course of action he outlined. Although the diplomats were not empowered to make decisions on their own, he said, they would make recommendations to their governments.

Sources said each country would review its diplomatic, trade, aid, cultural and other relations with the Soviet Union and Afghanistan. They said, however, that the second strategic arms limitation agreement between the U.S. and the Soviet Union, still not ratified by the U.S. Senate, was not necessarily going to be one of the "bilateral relationships with the Soviet Union" to be reviewed.

Referring to the planned protest at the United Nations, British sources said, "We think it's pretty urgent." Prime Minister Margaret Thatcher had said in a television interview earlier in the day that U.N. action should be sought quickly to deal with the "extremely serious" situation.

Thatcher, leading a chorus of European criticism of the Soviet Union, had told Soviet President Leonid Brezhnev in a letter delivered in Moscow on Saturday that she was "profoundly disturbed" by the Soviet Union's actions. She told him there was no evidence to substantiate Soviet allegations of outside interference in Afghanistan by the United States, China or others. The only outside country involved in internal Afghan affairs, she told him, was the Soviet Union.

Today, Thatcher said the invasion of Afghanistan "underlines everything I've been saying" about the recent Soviet military buildup and the threat she believes it poses to peace and Western freedom.

Since becoming prime minister last May, Thatcher has been an outspoken adversary of the Soviets and a staunch advocate of greatly beefing up Western defenses.

Perhaps more striking was the reaction of West Germany, which had been avoiding cold-war language in its relations with the Soviet Union.West German government spokesman Klaus Bolling said yesterday that his country viewed "the entry and engagement of foreign troops in Afghanistan as an extremely serious situation which raises basic questions of international relations."

Most other NATO allies also have condemned the Soviet action, as have four nations in the the strategic Persian Gulf not far from Afghanistan -- Kuwait, Bahrain, Oman and the United Arab Emirates. China has strongly attacked the Soviets, and Romania and Yugoslavia have been indirectly critical. East Germany has led Warsaw Pact praise of the Soviet Union.

In a short, sketchy communique, the diplomats who met here today said the intervention in Afghanistan "goes well beyond the previous level of Soviet activity in Afghanistan and in the Third World generally, and could carry grave implications for the future."

They reaffirmed "that the people of Afghanistan have the right to determine their own future without foreign interference, and that it is necessary to ensure that the course of recent events in Afghanistan is not repeated elsewhere."