In October, 1979, the FBI learned through national security wiretaps that the top officer in the Taiwanese intelligence service, Rear Adm. Wang Hsi-ling, had obtained a copy of secret U.S. war contingency plans whose disclosure could damage America's new ties with the mainland Chinese.

U.S. policy makers feared the Taiwan government might use the Pentagon document to disrupt the normalization process between the United States and the People's Republic of China by portraying the United States as an unwilling defender of its Asian friends.

The contingency plans for the redeployment of worldwide U.S. forces in the event of an attack by the Soviet Union in Western Europe called for the United States to abandon China and Japan in the Pacific theater and "swing" its forces into the Western Hemisphere to fully engage the Soviets.

On Oct. 9, 1979, portions of the war plan study dealing with the long-secret swing strategy appeared in the press. U.S. officials said the disclosure was troubling to the infant U.S.-China relationship, which was built in part on mutual security interests. President Carter ordered an investigation, but no charges were brought.

Since 1972, when the United States sought to open the door to mainland China, the exile Republic of China government on Taiwan has come to represent a covert intelligence threat.

In an unusual paradox of U.S. foreign policy, Taiwan has become America's friend and foe simultaneously at a time when the State Department and Department of Defense have publicly engaged in negotiations to send Taiwan sophisticated U.S. technology and weapons such as the F5 jet fighter.

U.S. officials emphasize that the intelligence services of Taiwan and other friendly nations do not represent anything approaching the threat of Soviet Bloc agents operating in this country.

Yet some senior U.S. officials assert that the Taiwanese intelligence service has penetrated the U.S. national security establishment in ways the Soviet KGB could only hope to do.

As such, Taiwan has engaged in some bold and unpublicized intelligence gambits in an unsuccessful struggle to reverse the American foreign policy initiative in China.

For example:

* Classified reports that circulated at the State Department's China desk on a given Friday were circulating in Taipei by the following Monday, according to one senior Carter administration official.

* In 1974, the FBI broke up a conspiracy by Taiwanese intelligence agents to illegally obtain American-made torpedoes for two surplus U.S. submarines. In order to protect diplomatic relations, however, the State Department successfully urged the government not to prosecute the foreign agents and American businessmen involved in the case.

* By 1977, the Taiwan government had become so involved in fomenting political opposition to the normalization process in this country by secretly funding demonstrations and other activities that the Carter administration added Taiwan to the secret "criteria list" of hostile foreign intelligence services and targeted Taiwanese diplomats for surveillance and national security wiretaps.

At the same time, American intelligence agencies continued to cooperate with Taiwan in gathering electronic and human intelligence from China, according to knowledgeable officials.

A spokesman for the Taiwanese mission in Washington, Ivan H. Wang, said his government would have no specific comment on intelligence operations in the United States.

Wang said he had no knowledge of the war plan study. As for the torpedo incident, he said, "We suggest you check with the agencies concerned."

Following what officials described as a peak of covert Taiwanese intelligence activities in 1978 and 1979, during the key China negotiations, U.S. officials say there are continuing national security problems posed by Taiwanese intelligence activities related to the sale of weapons and the transfer of technology.

The theft in 1979 of the war plan study was an intelligence coup "beyond the wildest dreams" of the Taiwan government, according to one FBI official familiar with the counterintelligence investigation.

This official described the sequence of events in which FBI agents learned through the bureau's wiretap program against Taiwanese diplomats that portions of the war contingency plans had leaked. The official identified Rear Adm. Wang Hsi-ling as the chief of Taiwanese intelligence operations and the recipient of the document.

Another FBI official confirmed this account without naming the recipient, but identifying him as a Taiwanese rear admiral in charge of intelligence operations.

A third official on the Carter National Security Council staff confirmed the account, also identifying the recipient as a rear admiral assigned to the Taiwan mission for intelligence purposes.

An article based on the war plan appeared in The New York Times, which stated that disclosure of the plan presented a serious dilemma for the U.S. government: "The study . . . suggests that the strategy could complicate the administration's new relationship with China, which is said to have strong interest in maintaining American power in the region . . . . 'Continuation of the concept runs the risk of alienating . . . [China and Japan].' "

Within days of the article's appearance, President Carter ordered the FBI to find out whether the Taiwanese intelligence service had secured other highly classified war plan material.

Carter's national security adviser, Zbigniew Brzezinski, demanded weekly reports from the FBI on the status of the investigation, which by the time it ended in 1980 proved inconclusive.

Richard Burt, the author of The New York Times article and now an assistant secretary of state in the Reagan administration, said in an interview that he was not aware of the investigation.

Also, he added, "I wasn't aware of any Taiwan connection [with the documents] if there was such a connection. I thought the information contained in the documents had legitimate news value and so did my editors."

Some former U.S. officials, such as William Gleysteen Jr., a one-time deputy chief of mission in Taiwan and currently the director of the Asia Society, say that while Taiwan has achieved some notable intelligence coups, it is an overstatement to say that Taiwanese agents have penetrated the upper strata of the U.S. national security establishment.

In addition, Robert Keuch, a former career Justice Department lawyer who served in the Carter administration as deputy assistant attorney general with responsibility for intelligence matters, said, "The level of Taiwan activity is not anywhere approaching the massive activity by the Soviet Bloc."

The difficulty in dealing with intelligence threats from friendly nations, however, lies in controlling those threats without damaging important relationships that allow U.S. intelligence agencies to share data collected overseas by foreign services.

Said Keuch: "Our intelligence agencies always get very concerned and come in and say, 'God, if you're going to stop them from doing that, they're going to stop helping us' " in liaison relationships overseas.

In the 1974 torpedo conspiracy, the State Department prevented the prosecution of several senior Taiwanese naval intelligence agents who were accused of working clandestinely with American businessmen to illegally obtain Mark 14 torpedoes for two U.S. diesel submarines purchased by Taiwan the year before.

President Nixon had authorized the sale of the World War II-vintage diesel subs "for anti-submarine warfare training only," according to a Defense Department spokesman.

U.S. officials discussed "spiking" the torpedo tubes so the 30-year-old Cutlass and the Tusk could not be used as offensive weapons.

But according to one official, the Navy argued that blocking the torpedo tubes was a useless exercise because Taiwan would be barred from purchasing torpedoes in this country.

Within months, however, "they [Taiwanese intelligence agents] actually went out and sought to steal torpedoes by recruiting Americans who had access to them," said a former Carter administration official.

One FBI official who participated in what is still a classified investigation said tht the Taiwanese agents solicited help from the "criminal element" in the Chinatown section of San Francisco and, for each torpedo illegally procured, they offered a bounty o $100,000, an inflated sum considering that the Taiwan government paid only $153,000 each for the submarines.

In the interim, the FBI official said, the Taiwanese agents offered $25,000 for an unclassified manual for the Mark 14 torpedo and its guidance system. The actual price o the manual was nominal and could be purchased directly from the Defense Department.

The FBI discovered and broke up the torpedo theft ring; the State Department quietly expelled the second-ranking Taiwanese intelligence officer in Washington and Justice Department officials "scared the hell out of" the American businessmen who had allegedly conspired to illegally obtain the weapons, according to an FBI official who participated in the case.

The episode was handled without any information appearing in the American media. State Department officials even limited their punishment to expelling the single Taiwanese official so as not to draw the attention of the press.

"It would not have served the public interest" to prosecute the Taiwanese officials at a time when the United States maintained an important intelligence-sharing relationship with the Taiwan government, one FBI official said.

"The idea was to stop the activity," the official added.

Obtaining weapons and swaying public opinion have been only part of Taiwan's intelligence efforts in the United States. U.S. officials say other efforts have been directed at secretly funding political demonstrations in the United States and monitoring dissident Taiwanese nationals, especially on American college campuses.

Concern about harassment of Taiwanese natinals in this country was rekindled last summer after the death under suspicious circumstances of a popular Taiwanese scholar teaching at Pittsburgh's Carnegie-Mellon University.

The professor, Wen-chen Chen, died during a visit to Taipei after he was detained for a marathon interrogation session by the national security police.

An official government investigation ruled Chen's death an accident or suicide, but the inquiry also revealed that Chen was mortally wounded in a fall from a Taipei building after he had been interrogated for 13 hours by the Taiwan Garrison Command about his political activities in the United States.

Though the United States has officially ended diplomatic relations with Taiwan, the island government maintains eight diplomatic and commercial "missions" in the United States under a bilateral agreement completed in 1979.

U.S. officials say Taiwanese intelligence agents worked assiduously on Capitol Hill during negotiations on that agreement to rally support from sympathetic congressmen, such as Sen. Barry Goldwater (R-Ariz.) and then-senator Richard Stone (D-Fla.), who today is a registered foreign agent for Taiwan.

These relationships extend beyond Capitol Hill and are deeply rooted by Cold War military assistance and 30 years of intelligence liaison between Taiwan and the United States.

Regardless of Taiwan's relative lack of sophistication vis-a-vis the Soviets, American intelligence officials say there could be increasing national security problems and mounting public resentment to sometimes rampant foreign intelligence operations by friendly nations in the American backyard.