Divers have retrieved the cockpit voice recorder from the wreckage of AirAsia Flight 8501, the second of two so-called "black boxes" that are likely to provide crucial evidence of why the Airbus A320 crashed in the Java Sea with 162 people on board. 

The recorder was freed early Tuesday from underneath the remains of one of the plane's wings at a depth of about 98 feet, a day after the aircraft's flight data recorder was recovered, said Tonny Budiono, sea navigation director at Indonesia's Transportation Ministry.

"Thank God," he said. "This is good news for investigators to reveal the cause of the plane crash."

The device will be flown to Indonesia's capital, Jakarta, to be downloaded and analyzed with the other box. Since it records in a two-hour loop, all discussions between the captain and co-pilot should be available.

The plane crashed 42 minutes into a flight from Surabaya, Indonesia, to Singapore on Dec. 28. All 162 people on board were killed, but only 48 bodies have been recovered so far.

The find is the latest boost in the slow-moving hunt to scour the shallow, murky stretch of ocean.

Over the weekend, the tail of the Airbus A320 was recovered, emblazoned with the carrier's red-and-white cursive logo. The black boxes are housed inside the tail, but were missing when the wreckage was pulled to the surface.

The devices were soon located after three Indonesian ships detected two strong pings being emitted from their beacons, about 22 yards apart. Strong currents, large waves and blinding silt have hindered divers' efforts throughout the 17-day search, but they took advantage of calmer early morning conditions on both days to extract the instruments.

The information pulled from the black boxes -- which are actually orange -- will likely be vital. Designed to survive extreme heat and pressure, they should provide investigators with a second-by-second timeline of the flight.

The voice recorder captures all conversations between the pilots and with air traffic controllers, as well as any noises heard in the cockpit, including possible alarms or explosions. The flight data recorder saves information on the position and condition of almost every major part in the plane, including altitude, airspeed, direction, engine thrust, the rate of ascent or descent and what up-or-down angle the plane was pointed.

"There's like 200-plus parameters they record," said aviation expert John Goglia, a former U.S. National Transportation Safety Board member. "It's going to provide us an ocean of material."

In their last contact with air-traffic controllers, the pilots of the AirAsia jet asked to climb from 32,000 feet to 38,000 feet to avoid threatening clouds, but were denied permission because of heavy air traffic. Four minutes later, the plane dropped off the radar. No distress signal was received.

Searchers also have been trying to locate the main section of the plane's cabin, where many of the victims' corpses are believed to be entombed.

Decomposition is making identification more difficult for desperate families waiting to bury their loved ones. Nearly all passengers and crew were Indonesian.

"I still believe many victims remain trapped there, and we must find them," said Gen. Moeldoko, Indonesia's military chief, who uses one name.

The Associated Press contributed to this report.