The amphibious assault ship USS Peleliu (LHA 5) transits the San Diego Bay for Rim of the Pacific 2014. Twenty-three nations, including China for the first time, are participating in the RIMPAC exercise, which features more than 40 ships and submarines and more than 200 aircraft and 25,000 personnel. (Mass Communication Spc. 2nd Class Kenan O'Connor/U.S. Navy)

BEIJING -- Participating for the first time in the world’s largest naval exercises, China sent along a little something extra this year: A surveillance boat lurking on the periphery, apparently meant to spy on the navy assets of other participating nations.

After U.S. officials noted the ship’s presence this weekend, China’s Defense Ministry defended the ship’s right to be there on Monday, stating the ship’s presence does not violate any coastal rights or international laws.

The Chinese naval ship is acting “in accordance with the international law and the international practice,” China’s Defense Ministry said in a statement in China’s state-owned Global Times. “China respects the rights of all relevant coastal countries under the international law, and hopes that relevant countries also respect the rights Chinese ships are entitled to under the law,” the ministry said.

It was a notable debut for China in the month-long biennial exercises, known as Rim of the Pacific or RIMPAC. China’s inclusion this year was earlier hailed as a positive sign for often troubled U.S.-China military relations and a way to avoid misunderstandings between the two world powers in a region increasingly tense about competing territorial claims between China and U.S. allies.

It’s not the first time China’s sent surveillance ships to RIMPAC. During the 2012 RIMPAC exercise, China sent a similar auxiliary general intelligence ship to spy on the drill. But according to Capt. Darryn James, a spokesman for U.S. Pacific Fleet, "To my knowledge, this is the first time a nation has ever sent a surveillance ship near Hawaii while also having invited ships participating in the RIMPAC exercise."

In an e-mailed statement, James said, "The U.S. Pacific Fleet closely monitors maritime activity in the Pacific, and we have taken all precautions necessary to protect critical information. … Our multinational leadership team informed all RIMPAC participants about the presence of the Chinese Navy surveillance ship prior to the at-sea exercise portion and to give it due regard for safety of navigation."

He also warned, "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."

The accusations of spying are notable for China, which often denounces the United States for doing the same in the South China Sea.

In a speech at a conference in Beijing in June, Adm. Sun Jianguo, deputy chief of general staff of the Chinese People's Liberation Army condemned U.S. naval spying.

“If Chinese naval ships patrolled frequently in the waters off San Diego in the west of the U.S., how would America feel,” Sun asked.

This year, four Chinese vessels — a supply ship, a missile frigate, a missile destroyer and a hospital ship — and their crews were invited by the U.S. to participate in naval drill.

But the uninvited spy ship has already prompted some proposals not to ask China back to the next RIMPAC, in 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," said Rep. Randy Forbes (R-Va.), chairman of the House Armed Services subcommittee on seapower and projection forces in an e-mailed statement. "It is clear their first trip to RIMPAC should be their last."