The Soviet Union expelled five British diplomats and a journalist today, bringing to 31 the number of Britons ordered out in the past five days and deepening the chill in Anglo-Soviet relations that began with the recent defection of KGB official Oleg Gordievski in London.

Britain, which earlier had expelled 31 Soviets, has decided not to retaliate against today's Soviet move, officials in London said. Britain believes further action would irreparably harm relations, they said, and it has come close to the end of the list of alleged Soviet spies there that was turned over by Gordievski.

The British officials said that even before today's Soviet move, no serious thought was given to further expulsions by Britain, barring "a totally absurd Russian reaction" to London's expulsion on Monday of six more Soviets, Washington Post correspondent Karen DeYoung reported from London.

While the retaliatory expulsions appeared to be at an end, it was nonetheless clear from statements by both sides today that rancor continued.

British Ambassador Bryan Cartledge, informed of the latest expulsion order by Soviet Foreign Ministry official Vladimir Suslov, called it a "vengeful, spiteful act, directed against wholly blameless people." He told journalists, "The Soviet action today was far from constructive: it represents a further setback."

The official Soviet news service Tass, in a harsh criticism of Britain's expulsion of the 31 Soviets, accused London of conducting a "malicious campaign of fanning up the feelings of mistrust and hostility to the Soviet Union."

After announcing the latest round of Soviet expulsions, Suslov told Cartledge that Moscow expected that "unfriendly actions" Britain had launched against Soviet citizens would be stopped.

The subject of the expulsions is expected to arise during a planned meeting between British Foreign Secretary Geoffrey Howe and Soviet Foreign Minister Edward Shevardnadze at the current U.N. General Assembly session.

Suslov, in the meeting in the Foreign Ministry today, gave Cartledge a list of the six Britons ordered to leave and accused them of engaging in activities incompatible with their status, a diplomatic euphemism often used to mean spying.

The six Britons, ordered to leave within three weeks, were five embassy officials -- Ian Sloane, a first secretary and cultural attache; Ian Wall of the communications staff; Robert Hooper, an assistant air attache; Sgt. Nigel Andrews of the air attache's staff; and Chief Petty Officer Paul Hughes of the naval attache's staff -- and Martin Nesirky, a Reuter correspondent.

The diplomatic kickball between Moscow and London began last Thursday, when Britain announced Gordievski's defection and ordered 25 Soviet diplomats, journalists and commercial employes to leave, accusing them of espionage. The Soviets retaliated by expelling 25 British diplomats, journalists and businessmen on Saturday, startling British diplomats here, who said they had anticipated a lesser response.

London then demonstrated its anger Monday by expelling six more Soviets, who, like the previous 25, apparently had been identified by Gordievski as spies.

The expulsions have sharply reduced the size of the already-small British community in the Soviet capital and deflated its morale. In addition to the 31 ordered out, six spouses of expelled embassy employes, who also were working as staffers, will leave.

DeYoung reported from London:

Although the diplomatic row appears to have ended in a draw, with the score even at 31 expulsions each, in percentage terms the British have lost more personnel in Moscow than the Soviets have in London. The total complement of British diplomats, embassy workers, businessmen and journalists has been reduced from 103 to 72. Their Soviet counterparts in London, who numbered 236 before last week, now are down to 205.

But the British government limits the number of Soviets permitted in London. With the recent expulsions, the allowable Soviet ceiling has been lowered and the personnel cannot be replaced. The Soviet Union, however, has not limited the number of Britons, diplomatic or otherwise, allowed in Moscow. Officials in London have said that Britain will send new diplomats to take the places of those expelled.

Aside from the question of replacing personnel, the overall damage done to the relationship between the two countries remains to be seen. Prime Minister Margaret Thatcher and Foreign Secretary Geoffrey Howe have devoted substantial efforts during the past year to increasing trade and diplomatic ties with the Soviets. Last year, British exports to the Soviet Union reached their highest level ever at more than $1 billion.

Britain, Howe said today, "did not lightly decide to expel Soviet citizens." He referred to the events of the past week as a "severe setback to U.K.-Soviet relations" that was "not of our choosing."

But officials said that, once confronted with the information Gordievski had provided, Thatcher was characteristically firm in deciding action must be taken, no matter what the bilateral cost.

"The bottom line as far as she is concerned is that national security comes first," one official said. "Everything else is second place to that."

Thatcher said in Luxor, where she is traveling during an official visit to Egypt, that "we have eliminated the core of their subversive and intelligence operation in Britain, so we shall not respond further to their wholly unjustified expulsions."

"I hope this is an end of the matter and that we can get on with a constructive relationship," she added.

Britain has insisted that none of the Britons expelled had an intelligence function. Officials in London say they are taking the strength of the Soviet reaction as a sign that new Soviet leader Mikhail Gorbachev "doesn't want to be seen as a leader who can be pushed around by a second-division country," in the eyes of either his Politburo colleagues or the United States, in advance of his November summit meeting with President Reagan.

"We accept that we are not in his league," an official said.

The press here has asked whether Britain, once it knew the identities of the alleged Soviet agents, could not have reduced the bilateral harm and benefited from an intelligence point of view by simply leaving them in place and watching them. It was noted that over the past 15 years, Britain has expelled 150 alleged Soviet agents, compared to about a third that number by France and only six by the United States.

Officials said that while the FBI might have the resources to watch and glean information from known Soviet agents, MI5, Britain's domestic intelligence unit, does not.