BANGKOK — An Indonesian Navy diving team retrieved one of the flight recorders from Lion Air Flight 610 on Thursday from the depths of the Java Sea, raising hopes that investigators will be able to solve the mystery of what led a brand-new Boeing jet to fall from the sky this week.

The navy team located the device at a depth of around 30 meters in waters northeast of the Indonesian capital, Jakarta. On Wednesday, search teams had heard pings from a locating beacon attached to the data recorder, but strong ocean currents stopped them from recovering the device.

Speaking from a ship where the device was being transported to Jakarta, the leader of the diving team, Senior Chief Petty Officer Hendra, told reporters that divers had to dig into the seabed to recover it. Although the machine was covered in mud, it was intact.

“We were desperate,” said Mr. Hendra, who uses just one name.

There are two so-called black boxes on each plane, and they are actually bright orange. One records conversations in the cockpit, while the other tracks crucial data, like airspeed, altitude and fuel flow.