The Pentagon says it has "secured an understanding" with Beijing that it will return a U.S. Navy underwater drone seized in the South China Sea.
The seizure of the submersible on December 16 sparked a row between Washington and Beijing that drew in U.S. President-elect Donald Trump, who said China stole the craft and can keep it.
The United States said the unmanned underwater vehicle (UUV) was being used to carry out scientific research in international waters near the Philippines when it was seized.
Washington said it issued a formal diplomatic complaint, demanded its immediate return, and warned China not to repeat such a move in the future.
But Pentagon spokesman Peter Cook said later on December 17 that China agreed to return the drone.
"Through direct engagement with Chinese authorities, we have secured an understanding that the Chinese will return the UUV to the United States," Cook said.
The Chinese Defense Ministry said the craft, which it said was retrieved and examined to maintain the safety of passing vessels, would be returned in an "appropriate manner," without saying when this might happen.
The ministry also accused the United States of "hyping up" the incident, calling its response "inappropriate and unhelpful."
The United States has "frequently" sent its vessels and aircrafts into the region, it added, urging such activities to stop.
Meanwhile, Trump slammed the Chinese Navy's capture of the drone.
"China steals United States Navy research drone in international waters -- rips it out of water and takes it to China in [unprecedented] act," Trump said in a message on Twitter on December 17.
"We should tell China that we don't want the drone they stole back -- let them keep it!" the president-elect said in a follow-up message.
Senator Ben Cardin, the top Democrat on the Senate Foreign Relations Committee, called the seizure "a remarkably brazen violation of international law."
Senior Republican Senator John McCain said the United States should not tolerate "such outrageous conduct," which he said will "continue until it is met with a strong and determined U.S. response."
The dispute has frayed already tense relations between Washington and Beijing at a time when China has been building up its military maritime outposts in the South China Sea.
China claims that most of the South China Sea is its own territorial waters -- a position that has led to maritime territorial disputes with Vietnam, Malaysia, the Philippines, Taiwan, and Indonesia.
Trump had already angered China by speaking on the phone with Taiwanese President Tsai Ing-wen on December 2, breaking a long-standing U.S. practice on the China-Taiwan dispute.
Trump also has said he does not feel "bound by a one-China policy" regarding the status of Taiwan, unless the United States gains trade or other benefits from Beijing.