Three British officers were harassed for five hours this week by Soviet soldiers brandishing cocked weapons after their military vehicle was rammed by a Soviet truck, British Army sources said today.

The incident, which occurred early Tuesday but was not disclosed until today, involved members of the British military liaison mission based in Potsdam.

Britain has lodged a strong protest with the Soviet military authorities in East Berlin over the action of the Soviet troops, allied sources said.

It was the first hostile encounter between Soviet troops and western liaison units since Maj. Arthur D. Nicholson Jr., an American, was shot to death 10 weeks ago by a sentry near a Soviet military base.

Despite no one being hurt, the latest clash could renew the controversy over the activities of the liaison teams, which carry out sanctioned espionage in both Germanys under the guise of mutual travel rights in the former occupation zones of the four World War II allies.

Since the Nicholson shooting, the British, French and U.S. units have been conducting sensitive negotiations with the Soviets to clarify the murky ground rules to avoid further outbreaks of violence against the liaison patrols.

The western teams roam through East Germany on daily reconnaissance missions, gathering what is considered the best on-site intelligence in Central Europe.

Soviet liaison units are allowed to engage in similar patrols through the former British, French and American sectors in what now constitutes West Germany.

British military sources, providing details of Tuesday's altercation, said the officers had parked their Mercedes jeep on a country road south of Cottbus, near the Polish border, three miles from the nearest restricted zone.

When two Soviet trucks pulled out of a passing military convoy and approached them, the British officers tried to withdraw. As they backed their vehicle away, one of the two trucks intercepted them and rammed the jeep so hard that two tires on the right side fell off. Several Soviet soldiers then joined the fray, hurling bricks and shovels.

Seeking to quell the confrontation, the British officers then drove the damaged jeep, tilting on its rims, to the nearest village for repairs. The Soviet soldiers followed and waved their cocked rifles menacingly while the Britons changed the tires.

A bag containing "military and personal equipment" was removed from the jeep without permission by a Soviet officer, according to a British military spokesman. Liaison teams, whose belongings are protected by diplomatic agreement, usually conduct their patrols with sophisticated surveillance devices and infrared cameras.

After their credentials were checked, the British officers were released and allowed to return to their base in Potsdam five hours after the ramming occurred.

"We have no idea why the Russians did this, especially since there was no provocation and our men were nowhere near a restricted zone," a British Army source said. "We know the Russians are guilty occasionally of bad driving, but this is ridiculous."

Such forms of harassment as ramming and temporary detention have occurred before. Last year, a French liaison vehicle was struck head-on by an East German Army truck. A French officer was killed and another injured in the collision.

The liaison teams have sought to avoid publicity in order to resolve their differences among themselves. But the Nicholson killing erupted into a political dispute between the United States and the Soviet Union that has hampered attempts by liaison officers to restore a "business-as-usual" atmosphere.

Washington has demanded an apology and compensation for Nicholson's family, which Moscow has rejected because it claims the sentry was performing his duty in shooting an intruder on a spy mission. The United States denied Soviet charges that Nicholson had crossed into one of the restricted military zones that now encompass 40 percent of East German territory.

In a show of displeasure over Tuesday's incident, Britain barred Soviet military officials today from a parade in West Berlin honoring the official birthday of Queen Elizabeth II.

Western diplomats say tensions with the Soviet Union also have increased recently over the three air corridors that link West Germany with West Berlin, located 110 miles inside East Germany.

The Soviet Union has urged western aircraft to fly at higher altitudes into Berlin to avoid Soviet air exercises. But the airlines have objected, claiming such changes would make landings more dangerous because of the steep angle of descent.

The four wartime allies operate a joint air traffic control center in West Berlin as one of their cooperative occupation legacies. Their soldiers also rotate guard duty at Spandau Prison, where Rudolf Hess, the 90-year-old Nazi war criminal, is the only prisoner.

British, French, U.S. and Soviet authorities also retain ultimate political control over the divided city through a complex series of accords dating back to the defeat of the Nazis.