Cargo ships are seen on the Philippines’ Subic Bay on April 30. (Jes Aznar/For The Washington Post)

The newest bar to grace this former U.S. military base is painted with American flags and shaded by a scaled-down Statue of Liberty.

Nearly 25 years ago, Philippine politicians fought to expel U.S. forces stationed here, vowing to “unchain” the country from its former colonial master, promising a future free of girly bars and foreign domination. Now, with Chinese ships cruising just off the coast, the Americans are back, chowing down on chicken tenders and drinking Budweisers served by the Liberty Sports Bar and Grill’s waitresses clad in red, white and blue.

Liberty’s owner, Mark Lindsay, 48, set up shop on the dock five months ago, betting that closer military ties between the United States and the Philippines would revive this once-wild port. Since then, he’s seen a steady rise in ships and sailors, with pit stops by U.S. war and supply vessels, an Ohio-class guided-missile submarine and, most recently, a Japanese aircraft carrier on a four-day “goodwill visit.”

“The more military the better, the more ships the better,” he said.

Mark Lindsey, 48, owner of the Liberty Sports Bar and Grill in Subic, Philippines. His bar is just a few steps away from where sailors come out after disembarking their ship for rest and recreation. (Jes Aznar/For The Washington Post)

The U.S. return to Subic is a symbol of the strategic shift sweeping Asia and a flash point heading into the Philippines’ presidential election on Monday.

A resurgent China claims nearly all of the South China Sea as its “inherent” territory based on maps with a U-shaped, nine-dash line that scoops deep into exclusive maritime economic zones claimed by the likes of the Philippines, Vietnam and Malaysia. In recent years, Beijing has built up islands across the area, stacking a growing number of outposts with civilian and military infrastructure.

China’s posture is bringing the Philippines and the United States back together. This year, the Philippines moved forward with the Enhanced Defense Cooperation Agreement, or EDCA, which allows the U.S. military to build facilities at five Philippine bases and is likely to mean more hardware at Subic Bay, which is now technically a commercial, not a military port.

That means U.S. and Chinese ships sailing in close proximity, deepening an already tense and dangerous standoff. For the Philippines, it raises tough questions about how the next administration should balance big powers while protecting Philippine sovereignty and fragile economic gains.

“Their challenge is to normalize relations with China in a way that doesn’t look like they are caving in,” said Jay L. Batongbacal, director of the University of the Philippines’ Institute for Maritime Affairs and Law of the Sea.

Residents boarding a boat in a fishing village in Subic, Philippines. (Jes Aznar/For The Washington Post)

Subic Bay’s deep, sheltered harbor has long been prized by foreign fleets.

The Spanish navy authorized the construction of the Arsenal de Olongapo in the 1880s, and the Americans moved in after the war with Spain in 1898. During the Vietnam War, it was a notoriously raucous “rest and relaxation” hub for millions of U.S. troops.

When the United States was pushed out in 1992, China was seen as a foreign-policy pipsqueak, more concerned with bolstering its gross domestic product than gaining a strategic edge. But three years later, Beijing built what it called fishing shelters on Mischief Reef, in the contested Spratly Islands.

“When they reclaimed it, we thought what will they do with this?” said Justice Antonio Carpio of the Supreme Court of the Philippines. “Now it’s bigger than some of the cities in the Philippines, with room for air and naval forces.”

In 2012, with Xi Jinping ascendant in Beijing, China and the Philippines were caught in a standoff over the Scarborough Shoal, a cluster of rocks and reefs west of Subic Bay. China eventually seized control of the area, changing the Philippines’ thinking on dealing with Beijing, said Richard Javad Heydarian, an assistant professor of political science at Manila’s De La Salle University.

Lights coming from the port area of the SBMA compound, a former U.S. base in Subic, Philippines, are reflected on the waters of the bay. (Jes Aznar/For The Washington Post)

“The Philippines realized we misread this guy; we thought he was Uncle Xi the nice guy, but we learned that Uncle Xi can be even feistier than Uncle Sam.”

The return of U.S. troops under EDCA maddens Beijing. “The U.S. military keeps talking about the so-called militarization in the South China Sea,” Hua Chunying, a spokeswoman for China’s Foreign Ministry, said at a news conference in March. “Maybe they can explain whether their increased military deployment in the South China Sea and nearby areas is an action of militarization or not.”

In the wake of the deal — and in the run-up to a ruling by an international tribunal on the South China Sea — U.S. and Philippine military experts increasingly use the term “red line” to discuss the prospect of new Chinese construction on Scarborough Shoal. They refer to it as the “last straw” and worry that China plans to turn the area into a military base.

With just days to go before the Philippines picks a new president, the question now is how the next leader will proceed, either sticking with the course charted by President Benigno Aquino III, who compared the People’s Republic to Nazi Germany and has been frozen out by Beijing, or somehow opening the door for better China ties without alienating the Americans.

The current front-runner, the tough-talking Rodrigo Duterte, has said he would consider talking to Beijing if the Chinese built a railroad in his home region. He also suggested that he would ride a personal watercraft to the Scarborough Shoal to plant the Philippine flag.

Challengers Grace Poe, a rookie senator who spent years living in the United States, and Manuel Roxas II, Aquino’s chosen successor and a Wharton-educated grandson of a former president, have both suggested that they would press ahead with the legal challenge launched by the current administration.

“The overall direction looks set,” said Yanmei Xie, a senior analyst at the International Crisis Group’s Beijing office. “That means pulling close to the U.S., Japan and other allies, continuing to carry out the arbitration case and trying to compel China to respect the ruling.”

Locals watch performers on stage at the Pier One bar inside the former U.S. base. (Jes Aznar/For The Washington Post)

In Subic, for now, that means more ships and thirsty sailors — for better and for worse.

Those who oppose the sex trade and the violence that often trails it are wary of a U.S. return, remembering the 2014 murder of a transgender woman, Jennifer Laude, by a U.S. Marine.

For many others here, the economic benefit of visitors is paramount, and they see boom times ahead for the former base. Said Lindsay, the owner of Liberty: “If China keeps at it, business will be great.”

Sherwin Alfaro in Subic Bay contributed to this report.