Indonesia has agreed to work with the Netherlands to investigate the mysterious disappearance of several World War II shipwrecks -- considered war graves -- from the bottom of the Java Sea, Dutch Prime Minister Mark Rutte said Wednesday.

The recent discovery that at least six Dutch and British warships sunk in 1942 had vanished from the seabed -- believed salvaged for scrap -- caused shock and dismay in Europe, and demands for answers.

Indonesia initially refused to take the blame for the missing ships, saying it had not been asked to protect the wrecks and therefore was not responsible for them.

But Jakarta has since agreed to cooperate with former colonial ruler The Netherlands in getting to the bottom of the mystery, Rutte said following a meeting with Indonesian President Joko Widodo.

"I would also like to thank Indonesia for its offer to cooperate after we learnt about the sad news on the shipwrecks," Rutte told reporters at the state palace.

"We'll work together to find clarity of what happened and we will coordinate in the future."

Indonesia?s foreign ministry spokesman confirmed Jakarta's ?political commitment? and said technical issues around who will lead the investigation would be settled soon.

Amateur divers discovered the long-lost wrecks of three Dutch warships in 2002, 60 years after they were sunk in the Battle of the Java Sea against Japanese forces.

But an international expedition that sailed to the wreck site ahead of next year's 75th anniversary of the battle was shocked to discover the wrecks and others had gone.

It is believed the ships were removed by illegal scavengers looking for scrap metal, an effort that could have taken years.

Britain expressed distress at the disappearance of its own three warships and asked Indonesia to "take appropriate action" to protect the sites from further disturbance.

More than 900 Dutch and 250 Indo-Dutch sailors died when Japan's navy overpowered British, American, Dutch and Australian sailors in what was one of the Allied forces' most disastrous defeats.