An armed U.S. Coast Guard cutter had a standoff with Chinese fishing boats off the coast of Ecuador over the summer, when the American boat looked to inspect the vessels on suspicion of possible illegal fishing, The Associated Press reported.

Hundreds of squid-fishing boats were in the area near the Galapagos Islands at the time, but when the Coast Guard cutter James approached, three Chinese vessels sped off while one aggressively turned 90 degrees toward the James, leading the American boat to employ evasive action to keep from getting hit.

"For the most part they wanted to avoid us," Coast Guard Lt. Hunter Stowes, the highest-ranking law enforcement officer on the James, said. "But we were able to maneuver effectively so that we were safe the entire time."

China, meanwhile, accused the U.S. of being in the wrong.

CHINESE FLEET FISHING NEAR GALAPAGOS PROTECTED WATERS, ALLEGEDLY FALSIFYING GPS LOCATION

US Coast Guard James

Guardsmen from the cutter James conduct a boarding of a fishing vessel in the eastern Pacific Ocean, on Aug. 3, 2022. (Petty Officer 3rd Class Hunter Schnabel/U.S. Coast Guard via AP)

The encounter took place in August during the Coast Guard's first operation in the eastern Pacific aimed at curbing illegal fishing in those waters. It followed concern by Latin American governments over Chinese activities. In 2021, 476 vessels bearing Chinese flags were seen fishing in the south Pacific, with a squid catch of roughly 422,000, an amount that some experts believe is unsustainable.

The situation unfolded at a time when tension between the U.S. and China was already high due to House Speaker Nancy Pelosi's visit to Taiwan. China had issued stern warnings against the visit beforehand. Government officials and TV personalities in China made threats against the U.S.

US-China confrontation

Guardsmen from the cutter James, in background right, conduct a boarding of a fishing vessel in the eastern Pacific Ocean, on Aug. 4, 2022. (Petty Officer 3rd Class Hunter Schnabel/U.S. Coast Guard via AP)

ECUADOR NAVY 'ON ALERT' AS 260-STRONG CHINESE FLEET NEARS GALAPAGOS ISLANDS

Chinese President Xi Jinping even warned President Biden in a phone call.

"Those who play with fire will perish by it. It is hoped that the U.S. will be clear-eyed about this," a Chinese readout of the Biden-Xi call said.

fishing vessel boarded

A fishing vessel is boarded by the U.S. Coast Guard in the eastern Pacific Ocean, on Aug. 6, 2022. (Petty Officer 3rd Class Hunter Schnabel/U.S. Coast Guard via AP)

CLICK HERE TO GET THE FOX NEWS APP

In the end, Pelosi went to Taiwan and returned without any major incident taking place.