The United States tentatively has secured the right to build air, naval and training bases on a chain of western Pacific islands as part of its search for alternatives to two key bases in the politically troubled Philippines.

Defense Department officials said yesterday that the agreement with the tiny Micronesian state of Palau completes a "defensive arc" in the Pacific where the United States could relocate the two facilities, Clark Air Base and Subic Bay naval base. The "arc" includes Guam and the northern Marianas.

Wary of the growing threat from communist Filipino guerrillas, the Pentagon is preparing for what could be an $8 billion relocation of the two bases, the largest U.S. military facilities abroad, if the Philippine government refuses to renew its lease agreement with Washington when it expires in 1991.

The agreement with Palau, a U.S. trust territory located 500 miles east of the Philippines, permits U.S. access and building rights on two existing airfields, port construction and use of 40 acres of Malakal harbor and the use of the largest island for military maneuvers and training, according to officials.

The compact must be approved by the Palau National Congress, by the electorate in a plebiscite Feb. 24 and by the U.S. Congress. All are expected to approve the 50-year accord, which will make Palau a "freely associated" U.S. partner with control over its domestic and foreign affairs.

Militarily insignificant by itself, Palau offers the potential for refueling stops and reconnaissance operations in support of larger facilities under consideration for Guam and the northern Marianas, the officials said.

"To the degree one looks at the next forward area for naval and air installations, we have completed the arc," said James Berg, political and economic adviser of the Office for Micronesian Status and Negotiation. "Palau is important, but clearly third in importance."

Palau granted the basing options as part of a larger accord called the Compact of Free Association, in which the United States agreed to assume "full authority and responsibility for defense and security" of the nation of about 13,000 people. The accord was signed last week in Karor, the capital of Palau.

The accord calls for $421 million in U.S. economic assistance over the life of the pact. No added aid would be required if Washington exercised its military base options.

Another clause allows the United States the right of "strategic denial," restricting the access of other foreign armed forces to the islands.

Although negotiations on the political status of Palau began in 1969, they acquired a new, military importance when the Philippines government of President Ferdinand Marcos began shaking from the triple threat of a communist insurgency, severe economic problems and charges of political corruption.

The Pentagon tentatively plans to spend about $800 million to upgrade the Clark and Subic Bay facilities, despite U.S. intelligence reports that Marcos' government is headed for a "catastrophe."

Marcos, who has called a special presidential election for next month in which he faces a tough challenge from opposition leader Corazon Aquino, has said he favors a continued U.S. presence in the Philippines but under more favorable terms.

Aquino has promised to maintain the U.S. bases until their lease expires in 1991, but has made no promises for what will happen then.

U.S. defense officials, faced with this political uncertainty and the growing communist insurgency, have intensified their search for alternatives to the Philippine bases.

Guam, a U.S. territory 1,500 miles east of the Philippines, has a large American naval and Strategic Air Command base. And the United States has leased more than 18,000 acres in the northern Marianas, a U.S. commonwealth territory.