The public relations firm headed by two of the closest aides of Ronald Reagan, the only major presidential hopeful to advocate restoring "official" U.S. relations with Taiwan, had been on Taiwan's payroll for more than 2 1/2 years.

Deaver & Hannaford, headed by Michael Deaver and Peter Hannaford, senior aides to Reagan while he was governor of California, and close aides and advisers ever since, was hired by the Republic of China (Taiwan) for "counsel and editorial assistance" on Nov. 18, 1977, according to records on file at the foreign agents registration section of the Justice Department.

The firm initially received a fee of $2,500 per month plus an expense account of $2,000 monthly, according to the records. Starting in November 1978, its fee was doubled to $5,000 per month plus expenses.

Hannaford, who signed the contract as board chairman of the public relations firm, said in an interview that Reagan had been asked in advance about the relationship with Taiwan and said that "it was fine with him."

Between the time Reagan left office as California governor in early 1975 and the time he became an official candidate for the GOP presidential nominaton on Nov. 13, 1979. Deaver & Hannaford served as his business coordinator and public relations counsel, according to Hannaford. For most of that time. Reagan's political activities were operated from the Los Angeles home base of the firm, where Reagan kept an office.

According to Hannaford, Reagan ceased to be a paying client of the public relations firm upon the announcement of his candidacy last winter. However, both Hannaford and Deaver have continued their close association with Reagan and his campaign on a nonpaid bases. Deaver is reported under consideration for the post of chief of campaign tours.

The Deaver-Hannaford firm, while receiving large sums from the Taiwan account, worked on speeches, press releases, newspaper columns and other public statements by Reagan, including a number backing Taiwan and opposing U.S. tiew with its adversary, the People's Republic of China.

One such speech, issued from Reagan's Deaver & Hannaford office on July 17, 1978, called on "friends of free China" to exert political pressure on the Carter administration in the cause of Taiwan.

"There was nothing improper or we would never have taken the [Taiwan] account," said Deaver, who recently reemerged as a key figure in the Reagan presidential drive after six months in a secondary position.

Hannaford, too, said there was "nothing wrong." He added that "Reagan was a strong supporter of Taiwan, and consistently so, before he ever met the two of us."

Reagan, in response to questions from The Washington Post, said through his press secretary, Ed Gray, that he had known of the contract since 1977 and had "no objection." Gray said the Taiwan arrangement with Deaver & Hannaford had no effect on Reagan's views, which "have been consistent with regard to Taiwan going back a number of years before the contract."

Reagan's heavy emphasis as well as his strong views on Taiwan during the drive for the GOP presidential nomination have been markedly different than those of any other major candidate.

In the usual daily rendition of the "stump speech" he has given from coast to coast, Reagan declares with emotion, often as his closing line, that "there's one message I want to deliver more than anything in the world as president -- no more Taiwans, no more Vietnams, no more betrayal of friends and allies by the U.S. government."

In his mid-March address to the Chicago Council on Foreign Relations, billed as his most important foreign policy speech as a candidate, he twice brought up Taiwan, praising its "private enterprise, thrift and hard work" and objecting in unspecific terms to the lack of U.S. reliability.

While campaigning in recent weeks, Reagan has said several times that as president he would support reestablishment of "official relations" with Taiwan, a position that worries many foreign policy experts, including some of Reagan's advisers.

U.S. relations with Taiwan were reduced to the "unofficial" level as part of the agreement with Peking on normalization of U.S.-China relations. This was announced by President Carter on Dec. 15, 1978, and denounced by Reagan as "outright betrayal" of Taiwan the following day in a statement issued through Deaver & Hannaford.

A. Doak Barnett of the Brookings Institution, who is a prominent authority on China, said that raising Taiwan relatins back to an "official" level would be viewed in Peking as "a decision by the American leadership to go back on the whole basis for normalization." In Barnett's view, "it would stop our relations with China in their tracks, and might even cause them to be seriously eroded over time."

John F. Lehman Jr., former deputy director of the Arms Control and Disarmament Agency and one member of the Reagan advisory team that met with him here on foreign policy and defense issues May 15, said he believes a majority of Reagan "inner circle" advisers is against major change in the U.S. relationship with mainland China, and that "probably a strong majority" of such advisers is against raising the level of U.S. diplomatic relations with Taiwan.

Lehman said, however, that China policy has not yet been the subject of a major advisory session with Reagan. While acknowledging that the candidate so far has taken a different tack than some of the advisers have, Lehman said the recent statement by Reagan seemed to be based "on the 3x5s" -- the cue cards of speech lines that reportedly are the basis for much of Reagan's rhetoric -- and should not be considered definitive for the fall campaign.

An earlier attempt to shift Reagan's hard-line positions on Taiwan-- undertaken by his then campaign adviser, John P. Sears, in July, 1978 -- did not succeed. According to Sears, Hannaford played a part in protesting and stopping the effort.

The incident arose from Sears' appearance at a breakfast session with Washington political reporters July 19, 1978, two days after Reagan delivered a lengthy speech in Los Angeles backing Taiwan and attacking normalization of U.S. reltions with Peking. Asked if Reagan would spearhead such a campaign in the coming months. Sears replied that Reagan should not be counted on to "automatically lead the charge" against U.S.-China ties, and said, "I wouldn't be surprised if Reagan visited China himself."

Sears, recalled that his remarks, as reported in the next day's Los Angeles Times, drew a sharp retort from a "highly upset" Hannaford. Sears' statements were a surprise to Reagan and the rest of us," Hannaford recalled. After discussions among the advisers, a denial was issued that Reagan was considered a trip to mainland China. It was issued, as was the practice, for Reagan through Deaver and Hannaford.

Reagan's publicized views on Taiwan go back at least to October 1971, when he visited the island as an emissary of then-president Nixon to assure its leaders that they would not be cast aside in Nixon's opening to Peking. Reagan has cited this trip as proof of his foreign policy experience.

Neither Deaver nor Hannaford had any known connection to Taiwan before their public relations firm was hired late in 1977 by I-cheng Loh, then minister of the Chinese Embassy and director of the Chinese Information Service in the United States. Hannaford said they made a bid for the business after hearing that another firm was leaving the account.

According to its reports to the Justice Department, Deaver & Hannaford has promoted Taiwan's interest in meetings between Taiwanese officials and citizens and the American press. There is no mention in the file of work for Reagan.

Hanaford said he had discussed Taiwan's positions on issues "on occasion" with Reagan while representing the island nation, and that he had accompanied Reagan to Taiwan in April 1978. The trip was not financed from official funds, he said.

Hannaford said he had "reviewed" with Reagan the draft of the July 17, 1978, address to a Chinese-American group in Los Angeles in which Reagan made a lengthy unusually detailed argument against normalization of U.S. relations with Peking.

This speech came less than two weeks after U.S. envoy Leonard Woodcock began the secret negotiations with the Chinese Foreign Ministry that led late that year to the surprise announcement of normalization of relations.

Hannaford said he was certian frp, discussion with Reagan at the time that neither the speech nor its timing reflected private knowledge from Taipei that the U.S.-China normalization deal ws under negotiation.