This comes after U.S. officials confirmed that they "secured an understanding" for the return of the device. Trump's tweet Saturday evening may extend one of the most serious incidents between the American and the Chinese 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. lodged a formal diplomatic complaint and demanded the drone back.

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 confirming that the device was an American unmanned submerged device, "China decided to transfer it to the U.S. through appropriate means."

The U.S. said that "through direct engagement with Chinese authorities, we have secured an understanding that the Chinese will return" the unmanned underwater vehicle, according to a statement from Peter Cook, spokesman for U.S. Defense Secretary Ash Carter.

But Trump, after holding a rally to thank supporters for his election, took to Twitter to criticize the deal. "We should tell China that we don't want the drone they stole back.- let them keep it!" the president-elect tweeted Saturday evening.

Earlier in the day, he had blasted the seizure.

Misspelling "unprecedented," he tweeted: "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.

The U.S. said China's "unlawful seizure" came in international waters. Yet China pointedly accused the U.S. of long sending ships "in China's presence" to conduct "military surveying."

"China is resolutely opposed to this and requests the U.S. stop such activities," Yang, the Defense Ministry spokesman, said in the statement. "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 nation's military was in contact with its American counterparts on "appropriately handling" the incident, though it offered no details on what discussions were underway.

Sen. John McCain, an Arizona Republican who is chairman of the Senate Armed Services Committee, said Sunday on CNN's "State of the Union" that the seizure of the drone was a "gross violation of international law."

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 some 450 meters (500 yards) of each other. He said 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."

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 midair 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.

The drone seizure seemed 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.