After a rocky patch of 25 years, the United States and the Philippines will solidify a new, increasingly complex military relationship this week, driven partly by China’s assertive actions in the South China Sea.

A new agreement that allows the United States to build facilities at five Philippine military bases will spread more American troops, planes and ships across the island nation than have been here in decades.

Joint military exercises this week and the arrival of Defense Secretary Ashton B. Carter on Wednesday will allow the two countries to show off their cozy relations and will include events rich in military symbolism.

Phil

Mr. Carter is scheduled to observe the firing of a long-range missile system, one that could cover all the Philippines’ maritime claims in the South China Sea if needed, though the United States has not confirmed that the missiles will be deployed here. Mr. Carter will also tour the location of a planned new United States military facility on the edge of disputed waters with China.

Analysts say the resurrected American presence here could tilt the balance of power in this part of the South China Sea.

The Philippines currently defends its claims in the sea with two nearly 50-year-old former United States Coast Guard cutters, which sometimes break down, and two fighter jets. This allows China to control territory, build artificial islands and chase off Filipino fishermen with little risk.

The new agreement could change that.

“The Chinese goal is not to pick a fight,” said Gregory B. Poling, chairman of Southeast Asia studies at the Center for Strategic and International Studies, based in Washington. “The Chinese goal is to put enough pressure that someone else blinks first. Just the ability to impose any kind of cost, to get any kind of vessel out there on site, forces the Chinese to make a decision about how much they really want to engage in a certain activity.”

The Philippines has been a strategic partner with the United States since World War II, and it is one of the oldest American allies in Asia. For decades, it hosted major American military bases at Subic Bay and Clark Air Base.

But in a wave of nationalist sentiment, Philippine lawmakers ejected the American military from the country in 1991. Years of strained military relations followed, but the two countries have come together in recent years over concerns about China’s claims in the South China Sea, which encompass more than 80 percent of the 200-mile exclusive economic zone of the Philippines in waters that Filipinos call the West Philippine Sea.

Mr. Carter said last week that the United States would also provide about $40 million in military aid to the Philippines to be used in part to improve the country’s patrol vessels, as well as to operate unmanned surveillance blimps that can watch over the islands controlled by the Philippines in the South China Sea.

China claims most of the South China Sea, a 1.4-million-square-mile expanse of the Pacific Ocean. The country says it is entitled to shoals and islets also claimed by Brunei, Malaysia, Taiwan and Vietnam, as well as much of what the Philippines says is its exclusive economic zone. Beijing has asserted its right to these areas in part by reclaiming land and building fortified artificial islands with military facilities.

The Philippines has sought international arbitration on the dispute, which could yield a decision in the next few weeks, but China has refused to participate.

The military agreement with the United States, which the Philippine Supreme Court approved in January, will allow the United States to build and operate facilities at five Philippine military bases for at least 10 years. The deal includes the country’s largest army base and four air bases, including one on the western island of Palawan, which runs for 270 miles along one side of the South China Sea.

That base, the Antonio Bautista Air Base in Puerto Princesa, will be used by the Philippines to monitor its economic zone in the South China Sea and by the Americans to protect their interests further afield, said Col. Restituto Padilla, a Philippine military spokesman.

“The American side has interests beyond our exclusive economic zone, including freedom of navigation throughout the South China Sea, so they will be using it to patrol beyond our areas,” he said.

But the four other bases are far from the South China Sea, and none of the five are naval bases, facts that have perplexed some observers.

Likewise, the vast facilities of Clark and Subic, which still contain long runways left by the Americans and a deep, protected harbor that can accommodate the largest United States vessels, were not included in the agreement.

Security analysts point out that ships can operate from long distances and that the United States has naval bases not far away, in Japan and Guam, and can use ports in Subic Bay and Manila to resupply. Airfields, on the other hand, need to be nearby in order to allow rapid response in the South China Sea.

“With air power, you need to be much closer to the action,” said Mr. Poling of the Center for Strategic and International Studies. “They clearly prioritized that.”

There were probably also budgetary considerations on the American side, according to Mr. Poling. “We are in an era of pretty constrained budgets in the U.S., and it is going to be difficult to get Congress to sustainably fund anything,” he said. “So you have to prioritize.”

The former United States military bases at Clark and Subic were not on the list because their uses have shifted in the 25 years since the Americans left.

Subic Bay has become a busy commercial port and industrial zone. Clark now includes a Philippine Air Force base, but it is also one of the country’s busiest civilian airports and a booming special economic zone.

The new agreement allows the United States to operate only within Philippine military facilities, Col. Padilla said.

The selection of bases makes sense, he said, when taking into account the broad mandate of the agreement, which includes helping the Philippines modernize its military and improve its response to natural disasters.

The agreement also covers joint efforts to address terrorism, an increasing concern in the southern Philippines, where extremist groups that have pledged allegiance to the Islamic State are holding 20 foreigners. On Saturday, 18 Philippine soldiers were killed in a daylong battle with Abu Sayyaf, the rebel group believed to be behind the kidnappings.

One facility the Americans will use is Lumbia Air Base, on the island of Mindanao, which is home to several groups the United States classifies as terrorist organizations. According to the Philippine Constitution, the United States cannot conduct military operations there but can support the Philippine forces with intelligence and training.

The other bases the Americans will use include Mactan-Benito Ebuen Air Base, a crucial staging point for disaster relief during Typhoon Haiyan, which killed more than 6,000 people in 2013, and Fort Magsaysay, a sprawling facility north of Manila with extensive space for positioning supplies.

“It is shortsighted for people to focus solely on the South China Sea,” Col. Padilla said. “There is a bigger picture here. We didn’t enter into this agreement for just one reason. We are modernizing our military.”

The Philippines still has a long way to go in that regard. For that reason, Matt Williams, country director in the Philippines for the risk management company Pacific Strategies & Assessments, says expectations about the impact of the new agreement on the balance of power in the South China Sea should be tempered.

“Even with a blank check and substantial political will, the Philippines is decades away from having a credible defense force,” he said. “China is playing a winning strategy in the South China Sea.”