BEIJING/WEST PALM BEACH, Fla. (Reuters) - China will return an underwater U.S. drone seized by a naval vessel this week in the South China Sea, both countries said on Saturday, but Beijing complained that Washington had been “hyping up” the incident.

U.S. President-elect Donald Trump, who has vowed to take an aggressive approach in dealing with China over its economic and military policies, jumped on the unusual drone seizure with a pair of provocative tweets, accusing Beijing of stealing the equipment.

The drone, known as an unmanned underwater vehicle (UUV), was taken on Thursday, the first seizure of its kind in recent memory. The Pentagon went public with its complaint after the action and said on Saturday it had secured a deal to get the drone back.

“Through direct engagement with Chinese authorities, we have secured an understanding that the Chinese will return the UUV to the United States,” Pentagon spokesman Peter Cook said in a statement.

The drone, which the Pentagon said was operating lawfully was collecting data about the salinity, temperature and clarity of the water about 50 nautical miles northwest of Subic Bay, off the Philippines.

It was seized just as the USNS Bowditch was about to retrieve it, U.S. officials said.

China’s Defense Ministry said a Chinese naval vessel discovered a piece of “unidentified equipment” and checked it to prevent any navigational safety issues before discovering it was a U.S. drone.

“China decided to return it to the U.S. side in an appropriate manner, and China and the U.S. have all along been in communication about it,” the ministry said on its website.

“During this process, the U.S. side’s unilateral and open hyping up is inappropriate, and is not beneficial to the smooth resolution of this issue. We express regret at this,” it added.

‘KEEP IT!’

Trump, a Republican who takes office on Jan. 20, waded into the dispute on Twitter early on Saturday from his seaside resort club Mar-a-Lago in Palm Beach, Florida, where he plans to spend the holidays.

“China steals United States Navy research drone in international waters - rips it out of water and takes it to China in unprecedented act,” he said.

After China said it would return the drone, Jason Miller, a spokesman for Trump, tweeted a link to a news story, saying: “@realdonaldtrump gets it done.”

There was, however, no evidence that Trump had played any role. U.S. officials said the negotiations took place in Beijing during the overnight hours in the United States. Miller did not respond to requests for comment.

Hours later, while riding in a motorcade back to his resort, Trump tweeted his second jab. “We should tell China that we don’t want the drone they stole back - let them keep it!” he said.

Trump has previously threatened to declare China a currency manipulator and force changes in U.S.-Chinese trade policy, which he says has led to the greatest theft of American jobs in history.

Trump has also raised questions about the most sensitive part of the U.S.-China relationship: whether Washington would stick to its nearly four-decades-old policy of recognizing that Taiwan is part of “one China.”

The USNS Bowditch, an oceanographic survey ship, is seen in this undated U.S. Navy handout photo. U.S. Navy via REUTERS

After his Nov. 8 election victory, Trump accepted a congratulatory phone call from President Tsai Ing-wen of Taiwan, prompting China to lodge a diplomatic protest.

President Barack Obama said on Friday it was fine for Trump to review Washington’s policy toward Taiwan, but he cautioned that a shift could lead to significant consequences in the U.S. relationship with Beijing.

“There’s probably no bilateral relationship that carries more significance and where there’s also the potential, if that relationship breaks down or goes into a full-conflict mode, that everybody is worse off,” Obama told reporters.

HEIGHTENED TENSIONS

The drone incident has raised fresh concerns about China’s increased military presence and aggressive posture in the energy-rich South China Sea, through which about $5 trillion in trade is shipped every year. Brunei, Malaysia, the Philippines, Taiwan and Vietnam also have claims to the waterway.

New satellite imagery shows China has installed weapons, including anti-aircraft and anti-missile systems, on all seven artificial islands it has built in the South China Sea, a U.S. research group said this week.

Without directly saying whether the U.S. drone was operating in waters Beijing considers its own, China’s Defense Ministry said U.S. ships and aircraft have for a long period been carrying out surveillance and surveys in “the presence” of Chinese waters.

“China is resolutely opposed to this, and demands the U.S. stops this kind of activity,” it said.

China will remain on alert for these sorts of activities and take necessary steps to deal with them, the ministry said without elaborating.

The Global Times, published by the ruling Communist Party’s official People’s Daily, earlier cited an unidentified Chinese source as saying they believed the issue would be resolved smoothly.