China said Saturday that its military seized a U.S. Navy unmanned underwater glider in the South China Sea to ensure the "safe navigation of passing ships," in one of the most serious incidents between the two militaries in years.

The Chinese navy on Thursday seized the drone, which the Pentagon said was being operated by civilian contractors to conduct oceanic research. The U.S. said it issued a formal diplomatic complaint over the seizure and demanded the drone's return.

Chinese Defense Ministry spokesman Yang Yujun issued a statement late Saturday saying that a Chinese navy lifeboat discovered an unknown device in the South China Sea on Thursday. "In order to prevent this device from posing a danger to the safe navigation of passing ships and personnel, the Chinese lifeboat adopted a professional and responsible attitude in investigating and verifying the device," Yang said.

The statement said that after verifying that the device was an American unmanned submerged device, "China decided to transfer it to the U.S. through appropriate means."

The statement also accused the U.S. of long deploying ships "in China's presence" to conduct "military surveying."

"China is resolutely opposed to this and requests the U.S. stop such activities," it said. "China will continue to maintain vigilance against the relevant U.S. activities and will take necessary measures to deal with them."

Earlier Saturday, China's foreign ministry said the country's military was in contact with its American counterparts on "appropriately handling" the incident, though it offered no details on what discussions were underway.

The drone was seized while collecting unclassified scientific data about 92 kilometers (57 miles) northwest of Subic Bay near the Philippines in the South China Sea, which China claims virtually in its entirety, Navy Capt. Jeff Davis, a Pentagon spokesman, said Friday.

"It is ours. It's clearly marked as ours. We would like it back, and we would like this not to happen again," Davis told reporters. He said the drone costs about $150,000 and is largely commercial, off-the-shelf technology.

The USNS Bowditch, which is not a combat ship, was stopped in international waters Thursday afternoon and recovering two of the gliders when the Chinese ship approached, Davis said. The two vessels were within about 450 meters (500 yards) of each other. He said that the USNS Bowditch carries some small arms, but that no shots were fired.

According to the Pentagon, as the Chinese ship left with the drone, which is about 3 meters (10 feet) long, its only radio response to the U.S. vessel was, "We are returning to normal operations."

President-elect Donald Trump blasted the seizure. Apparently misspelling "unprecedented," he tweeted Saturday: "China steals United States Navy research drone in international waters - rips it out of water and takes it to China in unpresidented act."

He later reissued the tweet, correcting the spelling to "unprecedented."

Bonnie Glaser, senior adviser for Asia at the Center for Strategic and International Studies, said the seizure of the glider occurred inside the exclusive economic zone of the Philippines, not China, and appeared to be a violation of international law.

China delineates its South China Sea claims with a roughly drawn sea border known as the "nine-dash line" that runs along the west coast of the Philippines. However, it hasn't explicitly said whether it considers those waters as sovereign territory, and says it doesn't disrupt the passage of other nations' shipping through the area. The U.S. doesn't take a position on sovereignty claims, but insists on freedom of navigation, including the right of its naval vessels to conduct training and other operations in the sea.

Davis said that the incident could be the first time in recent history that China has taken a U.S. naval vessel. Some observers have called it the most significant dispute between the sides' militaries since the April 2001 mid-air collision between a U.S. Navy surveillance aircraft and a Chinese fighter jet about 110 kilometers (70 miles) from China's Hainan island that led to the death of a Chinese pilot.

Whatever the outcome, the incident is likely to fray the already tense relations between U.S. and China. Beijing was angered by Trump's decision to talk by phone with Taiwanese President Tsai Ing-wen on Dec. 2, and by his later comments that he did not feel "bound by a one-China policy" regarding the status of Taiwan, unless the U.S. could gain trade or other benefits from China. China considers the self-governing island its own territory to be recovered by force if it deems necessary.

There also have been increased tensions over Beijing's ongoing military buildup in the South China Sea, mainly the development and militarization of man-made shoals and islands aimed at extending China's reach in the strategically vital area, through which about $5 trillion in global trade passes annually.

In one of the few reports in state media about the drone's seizure, a newspaper published by China's ruling Communist Party cited an unidentified military official as saying that a "smooth resolution" to the matter is expected.

A Chinese navy ship discovered an "unidentified device" Thursday and was checking on it for the sake of maritime safety, the Global Times quoted the official as saying.

"China has received the U.S. request to return the device, communication is open between the relevant departments of the two sides and I believe this matter will obtain a smooth resolution," the official was quoted as saying.

In a separate report, the paper quoted retired Chinese admiral Yang Yi as saying China considered itself well within its rights to seize the drone.

Yang said he was unsure of the purpose of seizing the drone, but didn't think the matter qualified as a "military conflict." However, he added that the chances of a confrontation had risen following Trump's recent comments, which were seen as testing China's bottom line on Taiwan and other sensitive issues.

"It's natural for us to take possession of and research for a bit these types of things that America sends to our doorstep," Yang said. "The louder they shout, the more their protests ring hollow."