China slipped an uninvited guest into the world’s largest naval exercise.

The U.S. invited four ships from China’s People’s Liberation Army Navy (PLAN) to the Rim of the Pacific 2014 exercise — a move that was hailed as a sign of improved military-to-military relations between the two countries.

But China also sent an electronic surveillance ship designed to monitor signals from the ships, right to the edges of the exercise.

“The U.S. Pacific Fleet has been monitoring a Chinese navy surveillance ship operating in the vicinity of Hawaii outside U.S. territorial seas,” Capt. Darryn James, a spokesman for U.S. Pacific Fleet, told USNI News late Friday.

“We expect this ship will remain outside of U.S. territorial seas and not operate in a manner that disrupts the ongoing Rim of the Pacific maritime exercise.”

James said the ship was not part of the exercise and would not speculate on the ship’s purpose but said that it appeared in the vicinity of Hawaii about a week ago.

“Any questions about the ship’s intent or capabilities will need to be addressed by the People’s Liberation Army Navy,” he said.

A message left with PLAN representatives at RIMPAC was not immediately returned.

As of Friday, the ship was operating south of the Hawaiian island of Oahu, near the USS Ronald Reagan (CVN-76) carrier strike group (CSG) and the main body of the 50 ships participating in the exercise, several sources confirmed to USNI News.

The ship is a Dongdiao-class auxiliary general intelligence (AGI) ship, one in a class of three PLAN ships designed to gather electronic and communication data from surrounding vessels and aircraft, sources confirmed to USNI News.

China watcher Andrew Erikson said the ship is likely to be one the PLAN’s most experienced, in a late Friday interview with USNI News.

“This AGI is most likely to be the Type 815 Dongdiao-class intelligence collection vessel Beijixing (pennant number 851), home ported in the East Sea Fleet,” Erickson, an associate professor at the Naval War College said.

“Beijixing is the most experienced vessel from the PLAN’s most advanced class of AGI. Based on Internet photos and Japanese government and other media reports, Beijixing is China’s most well-traveled AGI, having operated frequently near and within Japan’s claimed Exclusive Economic Zone (EEZ).”

The Dongdiao-class off Hawaii is operating inside the U.S. EEZ but not in territorial waters, James said.

“The Chinese Navy AGI ship’s presence is in accordance with international law regarding freedom of navigation,” he said.

“The U.S. Navy operates in waters beyond the territorial seas of coastal nations around the world while adhering to international law and norms, and China’s AGI is permitted to do the same.”

Monitoring electronic signals and communications from rivals exercises is nothing new. The U.S. and then-Soviet navies were famous for stalking one anothers exercises to gain intelligence information. China often accuses the U.S. of doing the same in areas like the South China Sea.

Adversaries and allies both can learn much from monitoring and analyzing electronic signals from a plane or a warship — say the frequencies in which an air defense radar operates. Likewise the communications between ships and aircraft can tell an adversary procedures of how a navy operates.

What’s strange about the Chinese ship monitoring RIMPAC from afar is four PLAN ships and their crews have already been included in most levels of the operation.

“For an operation that risks making the PLAN look like an untactful guest, as well as undermining its insistence that it has the right to oppose similar activities in its own EEZ, China would want to deploy the vessel least likely to make visible mistake(s) that would generate further embarrassment in that fishbowl environment,” Erickson said.

The revelation of the spy ship near the exercise has caused at least one member of Congress to say the U.S. shouldn’t invite China back for RIMPAC 2016.

“Given China’s recent disregard for principles like freedom of navigation and the peaceful resolution of territorial disputes, it was already a stretch to reward Beijing with an invite to such a prestigious event like RIMPAC,” Rep Randy Forbes (R-Va.) chairman of the House Armed Services Subcommittee on Seapower and Projection Forces told USNI News in a late Friday statement.

“Now we learn they chose to disrespect the 20 other international participants by sailing an intelligence gathering ship directly into the middle of the exercise. It is clear China is not ready to be a responsible partner and that their first trip to RIMPAC should probably be their last.”

RIMPAC — held every two years — includes 50 ships, 200 aircraft and more than 25,000 military personnel from 23 nations. The exercises will run until August.