China says it has returned a US underwater drone it intercepted in the South China Sea last week amid growing tensions between the two countries over their military build-up in the region.

China’s Defense Ministry said in a brief statement on Tuesday that the handover of the craft was “completed smoothly” after “friendly consultations” between both sides.

The Pentagon has also confirmed the return of the underwater probe.

In a statement released late Monday, Pentagon Press Secretary Peter Cook said, “This incident was inconsistent with both international law and standards of professionalism for conduct between navies at sea.”

“The US has addressed those facts with the Chinese through the appropriate diplomatic and military channels, and has called on Chinese authorities to comply with their obligations under international law and to refrain from further efforts to impede lawful US activities,” added the statement.

The Chinese Foreign Ministry dismissed US criticism of the drone issue as unreasonable after the Pentagon said last week the drone had been “unlawfully seized.”

A Chinese naval vessel seized the unmanned underwater vehicle (UUV) around 50 nautical miles northwest of Subic Bay last week.

The incident heightened already tense relations in the South China Sea where Beijing has moved to fortify its presence in the region against US support of opposite claims and Washington’s military build-up in Asia.

China said it snatched the craft because it might pose a safety hazard to other vessels. It also said it “strongly opposed” US reconnaissance activities and had asked Washington to stop.

China says it discovered a piece of “unidentified equipment” and checked it to prevent any navigational safety issues before discovering it was a US drone.

Beijing is highly suspicious of US reconnaissance activities in the disputed South China Sea. It has also repeatedly criticized US military presence in the region, accusing it of meddling in the regional issues and deliberately stirring up tensions in the sea.

The seizure of the drone brought a formal protest from the White House and set off one of their tensest standoffs in 15 years at a time when US President-elect Donald Trump has sought to take a tougher line with China.