KUALA LUMPUR (Reuters) - A collision between a U.S. warship and an oil tanker near the Straits of Malacca on Monday has shone a light on a territorial dispute that has simmered between neighbors Singapore and Malaysia for nearly 40 years.

A Malaysia Maritime Enforcement Agency (MMEA) officer shows to the media the area of the search and rescue operations for missing personnel of USS John McCain in Putrajaya, Malaysia August 21, 2017. REUTERS/Edgar Su

The guided-missile destroyer USS John S. McCain collided with merchant vessel Alnic MC to the east of Singapore, while heading to the city-state for a routine port call.

Ten U.S. sailors are missing and five were injured in the collision, which resulted in significant damage to the hull of the U.S. vessel and the flooding of some of its compartments.

Singapore and Malaysia both said the incident took place in their territorial waters, as the warship and oil tanker collided near the rocky outcrop of Pedra Branca, an area that has long been contested by both countries.

Both countries said they were leading the search and rescue operation for the missing sailors.

Singapore was once part of Malaysia but they separated acrimoniously in 1965, clouding diplomatic and economic dealings for years.

The International Court of Justice ruled in 2008 that Pedra Branca, which means “white rock” in Portuguese, belonged to Singapore and a nearby feature called Middle Rocks belonged to Malaysia.

Malaysia sought a review of the ruling this year, reopening the dispute.

The Maritime and Port Authority of Singapore (MPA) said it was notified just before dawn of the collision in “Singapore territorial waters” in the Singapore Strait, and Singapore was leading the search and rescue operations.

Malaysia insisted that the incident happened in its waters, just miles off its southern state of Johor.

Malaysia’s navy chief, Admiral Ahmad Kamarulzaman Ahmad Badaruddin, told Reuters the KD Handalan was the first to respond to the distress call from the U.S. ship.

“KD Handalan was just three miles from the USS McCain when it first received the distress call,” he said.

Malaysia’s Maritime Enforcement Agency Director General Zulkifili Abu Bakar told reporters Malaysia disputed Singapore’s assertion that the accident happened in its waters.

He said the Malaysian search and rescue operation was independent of Singapore’s and Malaysia had not communicated with its neighbor about the incident.

“What is important is, we do not want to have another collision between assets on the ground,” Zulkifili said. “For the time being, we shouldn’t be arguing about whose waters it is, the most important thing is to focus on search and rescue.”

The Malaysian navy assigned four vessels and a Super Lynx helicopter for the search and rescue, while the Malaysian armed forces and maritime authorities also deployed more assets. The Indonesian navy said it had deployed two warships.

The U.S. Navy said Singapore and U.S. assets were involved in search and rescue. It said in a statement late on Monday that Malaysian navy vessels and a helicopter had joined the search in the afternoon and Admiral Scott Swift, commander of the U.S. Pacific Fleet, thanked Malaysia for its “great support”.

For a graphic on the collision, click: