WASHINGTON (CNN) -- In what a U.S. military official calls an "inadvertent encounter," a Chinese submarine hit an underwater sonar array being towed by the destroyer USS John McCain on Thursday.

The USS John S. McCain, left, anchored at the port of Incheon 40 km west of Seoul, Korea in March 2004.

The array was damaged, but the sub and the ship did not collide, the official said. A sonar array is a device towed behind a ship that listens and locates underwater sounds.

The incident occurred near Subic Bay off the coast of the Philippines.

The official, who declined to be named because the incident had not been made public, would not say whether the U.S. ship knew the submarine was that close to it.

However, the Navy does not believe this was a deliberate incident of Chinese harassment, as it would have been extremely dangerous had the array gotten caught in the submarine's propellers.

The Navy has complained in the past that Chinese vessels, including fishing boats, have deliberately tried to disrupt U.S. naval activities in international waters near China. In one widely publicized incident in March, five Chinese vessels maneuvered close enough to the USNS Impeccable to warrant the use of a fire hose by the unarmed American vessel to avoid a collision. The Navy later released video of that incident.

All About U.S. Navy Activities • China