Updated

A U.S. Navy mapping ship confronted by Chinese vessels over the weekend was operating illegally in China's exclusive economic zone, the Foreign Ministry said Tuesday, in Beijing's first formal comment on the latest friction between the two militaries.

Ministry spokesman Ma Zhaoxu dismissed U.S. accusations that Chinese boats operated recklessly and without cause, saying the claim was "totally inaccurate and confuses right and wrong and is unacceptable to China."

The ship, the USNS Impeccable, "broke international and Chinese laws in the South China Sea without China's permission," Ma said at a regularly scheduled news conference.

The U.S. Defense Department says Chinese ships surrounded and harassed the Navy vessel in international waters in the South China Sea on Sunday, at one point coming within 25 feet (8 meters) of the American boat and strewing debris in its path.

China views almost the entirety of the South China Sea as its territory. Its claims to small islets in the region have put it at odds with five governments — the Philippines, Vietnam, Malaysia, Brunei and Taiwan.

Observers said the incident appeared to be a deliberate assertion by Beijing of its territorial claims, saying repeat incidents were likely as the Chinese navy continues to raise its regional profile.

Shen Dingli, director of the Center of American Studies at Shanghai's Fudan University, said the confrontation was a message not only to the U.S., but also to other countries with whom it has territorial disputes.

The incident, the latest in a series of confrontations between U.S. surveillance craft and Chinese coastal defenses, took place in international waters about 75 miles (120 kilometers) south of Hainan Island, which hosts naval and air force installations and is the location of Beijing's newest submarine base.

The episode had overtones of spycraft, but the U.S. ship is not, strictly speaking, a spy ship. It maps the ocean floor with sonar, compiling information the Navy can use to steer its own submarines or track those of other nations.

The U.S. Embassy in Beijing said a protest was lodged with the Chinese Foreign Ministry as well as with the Chinese Embassy in Washington. The incident will likely be discussed when Chinese Foreign Minister Yang Jiechi visits Washington this week.

The Impeccable had been conducting "routine operations in the South China Sea in accordance with customary international law," the Embassy said.

"The actions of the Chinese vessels put both sides at risk and are inconsistent with the obligation for ships at sea to show due regard for the safety of our ships," the statement said, adding Washington would continue operating in the area.

Beijing argues that any intelligence data gathering by foreign governments within its exclusive economic zone is illegal, although the U.S. and other nations say only exploitation of economic resources such as undersea gas deposits is restricted. A country's exclusive economic zone generally extends 200 nautical miles from its actual territorial waters.

The altercation between the two militaries was the most public since tensions spiked in 2001 when a U.S. spy plane and Chinese fighter jet collided in international air space off Hainan, killing the Chinese pilot and forcing the American plane to make an emergency landing at a Chinese air base. Occasional minor clashes have followed, none of which have led to a major crisis.

The weekend incident comes amid an overwhelmingly positive start to relations between China and the new U.S. administration of President Barack Obama, with U.S. Secretary of State Hillary Rodham Clinton receiving a warm welcome during a visit to Beijing last month.

Clinton's visit was followed by one from David Sedney, U.S. deputy assistant secretary of defense for East Asian security affairs. That marked the first formal military dialogue between the People's Liberation Army and the U.S. since China canceled or suspended nearly a dozen military exchanges last year in protest over a U.S. arms sale to rival Taiwan.

Despite the positive momentum in ties, the U.S. military remains wary of China's rapid military buildup, fueled by double-digit annual percentage increases in the defense budget.

In a report on his visit, Sedney noted U.S. worries about opaque Chinese defense spending, a weapons buildup across from Taiwan and arms sales to Iran that the Obama administration believes are hurting stability in the Middle East by fueling terrorism.

Calls to China's Defense Ministry rang unanswered Tuesday.