Protesters burn images of Chinese president Xi Jin Ping, Philippines president Rodrigo Duterte and local government officials on June 25, in front of the Chinese Embassy in Makati, Philippines. (Jes Aznar/Getty Images)

When a Chinese trawler rammed a Philippine fishing boat in the South China Sea last month — forcing 22 fishermen to abandon their stricken vessel — officials in Manila were quick with condemnations.

“Cowardly,” the Philippines’ defense secretary said.

Military commanders followed suit, telling reporters it was time for President Rodrigo Duterte to get tough with China after years of increasingly cozy ties.

Instead, the Philippine leader sided with Beijing.

Eight days after the sinking, Duterte dismissed the June 9 crash near Reed Bank as a “little maritime accident” and rebuffed the pleas of Philippine fishermen demanding a firmer stance to protect their crafts in the disputed South China Sea.

“I’m sorry, but that’s how it is,” Duterte said.

Then the defense secretary, Delfin Lorenzana, walked back his earlier statement, saying that perhaps the Chinese “didn’t mean to brush against our boat.” The boat’s captain joined in — saying he was no longer sure if they had been rammed at all.

Manila’s flip-flop over the stranded fishermen — despite evidence in a coast guard report that the Chinese mariners acted inappropriately — shows how far the long-standing U.S. ally has fallen under Beijing’s spell.

Henry Liong, left, president of Federation of Filipino Chinese Chambers of Commerce and Industry (FFCCII), speaks as Junel Insigne, center, and Felix Dela Torre, the respective captain and owner a fishing vessel that sank after it collided with a Chinese fishing boat off Reed Bank in the South China Sea, listen during a news conference in Manila on June 28. (Ted Aljibe/AFP/Getty Images)

Greased by Chinese loans and grants under President Xi Jinping’s signature Belt and Road infrastructure program, the Duterte administration has warmed to its giant neighbor while playing down the dispute over their competing territorial claims in the South China Sea.

Now the longer-range questions stand in sharp relief: How far will Duterte go to support his new friends in Beijing at the risk of isolating his key military ally, Washington?

The Philippine government “has an incentive for this to be an accident,” Gregory B. Poling, ­director of the Asia Maritime Transparency Initiative, said of the boat incident.

Manila’s approach, he said, is “predicated on the idea that if it’s just quiet about its claims and nice enough, Beijing will reciprocate” with investment and development assistance.

Beijing claims sovereignty over almost all of the South China Sea, which connects East Asia with the Indian Ocean and is one of the world’s busiest trade routes. In recent years Beijing has occupied and built up disputed reefs and islets with runways, radar and military installations, prompting alarm from the United States and its allies.

An international tribunal in 2016 upheld the Philippines’ claims to territorial waters. But China has shrugged off the ruling.

To assert its territorial claims, China deploys what security experts refer to as the maritime militia — a paramilitary force of vessels that swarm disputed fishing grounds, conduct surveillance and prevent Philippine and other fishermen from accessing sandbars and reefs claimed by the Philippines and other littoral states.

The militia “plays a major role in coercive activities to achieve China’s political goals without fighting,” the Pentagon said in a report in May.

For Duterte’s critics, his meek response to the boat incident demonstrates the extent to which China has seduced him into compliance. Some accuse him of selling out his country.

Filipino protesters with Philippine flags march toward the Chinese consulate to mark Philippine Independence day on June 12, in the business district of Makati, Philippines. (Jes Aznar/Getty Images)

A senior Philippine navy official, who spoke on the condition of anonymity because he was not authorized to talk to the media, said he had logged the activities of China’s maritime militia every day for more than a year, but felt the reports he filed went nowhere.

A former senior official at the Armed Forces West Command, the unit monitoring the South China Sea, said his Facebook feed is filled with laments from his contemporaries. “They feel their work has gone to waste,” he said, speaking on the condition of anonymity because of the sensitivity of the issue. “We worked so hard, just to let China do that to us.”

Poling, the security analyst, said the Philippine navy and coast guard “have to sit there and grit their teeth, watching hundreds of Chinese boats act with impunity in Philippine waters.”

After winning office in 2016, Duterte traveled to Beijing and declared he was ready to uncouple the Philippines from America.

Xi repaid the favor late last year, visiting Manila and promising largesse for infrastructure projects and resources exploration — a familiar method China has rolled out across Asia, leaving some nations with burdensome debts. An online gambling industry in the Philippines catering to Chinese clientele is booming.

Duterte, best known for a drug war that has left thousands dead, commonly reasons when answering criticism of his policy toward Beijing that the Philippines cannot afford war with China.

“China just wants to be friends with us. They gave us arms, ammunition. I turned to them because America failed to deliver what we ordered,” Duterte said at a campaign rally in April. Neither the president’s office nor the defense secretary responded to requests for comment by The Washington Post.

Under pressure from the West over his human rights record, Duterte “owes his political survival to China,” said independent security analyst Jose Custodio. “They’re his bread and butter.”

In its report dated June 20, the Philippine coast guard said the Chinese trawler violated maritime laws and “failed to . . . avoid the risk of collision and to render assistance to a vessel in distress.” The Philippine fishermen in the Reed Bank crash were eventually rescued by a Vietnamese ship.

Still, Duterte told reporters the crash was “very small because nobody died.” His spokesman said there was no contradiction between the report and the president’s statements.

The Chinese Embassy said last month that its ship was “besieged by seven or eight Filipino fishing boats,” though satellite imagery cast doubt on that account. The Chinese side later suggested a joint investigation and rejected Philippine officials’ idea to involve a third party. Beijing has not released its own findings in full.

From left, Jaypee Gordiones, Felix Dela Torre and Richard Blaze, crew members of a fishing vessel that sank after it collided with a Chinese fishing boat off Reed Bank in the South China Sea, are mobbed by journalists following a news conference in Manila on June 28. (Ted Aljibe/AFP/Getty Images)

China’s Foreign Ministry did not respond immediately to a request for comment on the incident, its maritime militia and its policy toward Manila.

Sung Kim, the U.S. ambassador to the Philippines, called for full accountability for the Chinese crew involved in the incident.

Public polls also show that Filipinos still trust the United States more than China. The military trains with the United States, and Secretary of State Mike Pompeo has assured American intervention in the case of an attack. Last week, Philippine Foreign Secretary Teddy Locsin said the United States remains a “true friend” and “natural ally.”

In the past, joint U.S.-Philippines military exercises involved situations responding to aggression in the South China Sea — but in remarks last month, Duterte said such activities could trigger a war.

Despite frustration with Duterte’s approach, it is unlikely that military leadership will actively urge for a policy shift. Ranting in the halls is “as far as it will go,” said a senior armed forces official.

Custodio, the security analyst, said China had gained the upper hand to the point where it did not need to fear that it was pushing Manila’s friendship.

“They know they have the Philippines,” he said. “What happened in Reed Bank is China’s return on investment.”

Yuan Wang in Beijing contributed to this report.