The visit by the aircraft carrier Carl Vinson to the port of Da Nang in Vietnam marks an important shift in regional views of the American military presence in Asia. It also highlights the difficulty the United States will have maintaining its Asian presence until new carriers join the fleet in coming years.

The visit, the first of its kind since 1975, represents the maturing of a policy of friendship and cooperation between Hanoi and Washington in response to what both nations perceive as a growing Chinese threat to international order in the East Pacific. It is one that will last as long as Vietnam believes it is in its interest to host U.S. military forces.

Vietnam’s foreign policy since the end of the Vietnam War is an excellent illustration of the dictum by the 19th century British statesman Lord Palmerston — that a nation should not have eternal allies or perpetual enemies, but should always follow its permanent interest to preserve its independence.

Following the U.S. departure from Saigon 1975 Vietnam turned to the Soviet Union, then greatly at odds with China, to provide a military presence that might deter Chinese ambitions.

It offered Moscow a 25-year lease on the former U.S. naval base at Cam Ranh Bay and the right to operate Soviet military aircraft from the former U.S. airbase at Da Nang.

The lease expired in 2002, and although Vietnam has continued to host Russian naval visits it has not made a new exclusive arrangement to lease its bases to Moscow. Instead it has turned increasingly to the United States as China’s encroachments in the South China Sea have threatened Vietnamese territorial claims.

What has made the new friendship possible is the firm decision of the United States under both presidents Barack Obama and Donald Trump to protest Chinese intrusions in the South China Sea and to maintain a strong naval presence in the region.

It is also worth noting that the end of the Vietnam war marked a change in U.S.-China relations and that while the Soviet Navy visited Vietnam in the 1980s China invited the U.S. Navy to visit Chinese ports. Now Russia poses little threat to China, and China looks on the U.S.military presence in the Eastern Pacific as an obstacle to its ambitions regarding the South China Sea and Taiwan. Late last year a Chinese official declared that if the United States sent a carrier to visit Taiwan it would be an act of war.

The Carl Vinson is not likely to call on a Taiwan port because of the terms of the 1972 Shanghai Agreement and succeeding pacts with China. But its presence in Southeast Asia is a clear statement of support for Taiwan as well as a guarantor of freedom of navigation in waters illegally claimed by China.

It is also available if needed to support military operations on the Korean Peninsula. And it heads the third Navy carrier task force deployed in East Asia.

But the Navy simply does not have the capacity to sustain three full-size carriers in the East Pacific for the long haul while also meeting the demands of other peacetime naval presence missions, for example in the Persian Gulf and Mediterranean.

A long-tested rule of thumb says that for every carrier deployed in distant waters there needs to be one in homeport preparing for its next mission and one in home waters doing the necessary training for a distant deployment. In addition, carriers all need what is called a mid-life ship life extension program when the craft is in dry dock for an extended period.

For that reason the planning criteria for the Navy during the Cold War called for 12 active full-size carriers plus one in dry dock, for a total of 13 ships, to support just four forward-based carrier task forces.

Today, because of budget reductions during the Obama administration, the Navy has only 11 full-size carriers, 10 of the Nimitz class and one of the new Gerald R. Ford class. It plans to add a 12th carrier around 2022 and a 13th around 2025.

Until then the Navy will have a hard time sustaining the size of its East Asia deployment, something that should worry our Asian allies and us.