Foreign ministry spokesman Ma Zhaoxu said US complaints that five Chinese vessels had harassed the USNS Impeccable were "totally inaccurate".
Beijing says the US ship was conducting activities within the waters of its special economic zone.
Under international law, Chinese territorial waters extend 12 nautical miles (22km) off its coast and its Exclusive Economic Zone (EEZ) extends 200 nautical miles.
Meanwhile, US navy surveillance vessel was on routine operations in international waters 75 miles (120km) south of Hainan island.
China says the US was in its Exclusive Economic Zone -but the two sides disagree on what activities are allowed in an EEZ
So they most likely were in the Chinese Exclusive Economic Zone.
China says that any intelligence data gathering by foreign governments within its EEZ is illegal - but the US does not agree with this.
Imagine my non-surpise that the US does not agree with China's claims.
The Impeccable is used to map the ocean floor with sonar. The information is used by the US navy to steer its own submarines or track those of other nations.
What should come as no surprise there just happens to be a large Chinese submarine base on Hainan island.
Aggressive manoeuvring by ships of rival navies in sensitive international waters is not uncommon, correspondents say.What a convenient distraction!