Experts recovered the data recorder of a fire-ravaged ship carrying chemicals that is slowly sinking off Sri Lanka’s capital, as salvage crews stood by to head off a possible environmental disaster, officials said Sunday.

The Singapore-flagged MV X-Press Pearl started sinking Wednesday, a day after authorities extinguished a fire that raged on the vessel for 12 days. Efforts to tow the ship into deeper waters away from the port in Colombo had failed after the ship’s stern became submerged and rested on the seabed.

Sri Lanka Ports Authority said experts together with the navy on Saturday recovered the ship’s voyage data recorder, or VDR, commonly known as the black box.

Unidentified foreign investigators inspect debris washed ashore on the beach from the fire-damaged container ship MV X-Press Pearl in Kapungoda, on the out skirts of Colombo, Sri Lanka, Friday, June 4, 2021. Authorities were trying to head off a potential environmental disaster as the Singapore flagged ship that had been carrying chemicals was sinking off of the country's main port. (AP PhotoEranga Jayawardena)

Unidentified foreign investigators inspect debris washed ashore on the beach from the fire-damaged container ship MV X-Press Pearl in Kapungoda, on the out skirts of Colombo, Sri Lanka, Friday, June 4, 2021. Authorities were trying to head off a potential environmental disaster as the Singapore flagged ship that had been carrying chemicals was sinking off of the country's main port. (AP PhotoEranga Jayawardena)

The authority said on its website said that the VDR, which contains vital information related to the operation of the vessel, would be handed over to local law enforcement agencies investigating the fire.

Both the authority and the ship’s operator said the vessel's aft portion remains on the seabed at a depth of about 21 meters (70 feet), and the forward section continues to settle down slowly.

Operator X-Press Feeders said salvors remain on the scene to deal with any possible spills. It has apologized for the disaster.

Fire-damaged container ship MV X-Press Pearl is seen partially sunk where it is anchored off Colombo port at Kapungoda, Sri Lanka, Friday, June 4, 2021. The Singapore-flagged ship started sinking Wednesday, a day after authorities extinguished a fire that raged on the vessel for 12 days. (AP PhotoEranga Jayawardena)

Fire-damaged container ship MV X-Press Pearl is seen partially sunk where it is anchored off Colombo port at Kapungoda, Sri Lanka, Friday, June 4, 2021. The Singapore-flagged ship started sinking Wednesday, a day after authorities extinguished a fire that raged on the vessel for 12 days. (AP PhotoEranga Jayawardena)

The port authority and the operator said there were no signs of oil or chemical spills. They said that Sri Lanka's navy, Indian coast guard, salvage crews and local authorities were capable of responding to any signs of oil pollution or debris, and were monitoring the situation around the clock.

The fire has destroyed most of the ship’s cargo, which included 25 tons of nitric acid and other chemicals. But there are fears that remaining chemicals as well as hundreds of tons of oil from the fuel tanks could leak into the sea.

Such a disaster could devastate marine life and further pollute the island nation’s famed beaches. The disaster has already caused debris — including several tons of plastic pellets used to make plastic bags — to wash ashore.

This photo provided by Sri Lankan Air Force shows the sinking MV X-Press Pearl at Kapungoda where it is anchored off Colombo port, Sri Lanka, Wednesday, June 2, 2021. Salvage experts were attempting to tow the fire-stricken container ship that had been loaded with chemicals into the deep sea as the vessel started to sink Wednesday. Water submerged the MV X-Press Pearl's quarterdeck a day after firefighters extinguished a blaze that had been burning for 12 days. (Sri Lanka Air Force via AP)

This photo provided by Sri Lankan Air Force shows the sinking MV X-Press Pearl at Kapungoda where it is anchored off Colombo port, Sri Lanka, Wednesday, June 2, 2021. Salvage experts were attempting to tow the fire-stricken container ship that had been loaded with chemicals into the deep sea as the vessel started to sink Wednesday. Water submerged the MV X-Press Pearl's quarterdeck a day after firefighters extinguished a blaze that had been burning for 12 days. (Sri Lanka Air Force via AP)

The government has banned fishing along about 80 kilometers (50 miles) of coastline.

Officials say there had been about 300 tons of oil on board and that experts believe it could have burned off in the fire.

A ship manifest seen by The Associated Press described the X-Press Pearl as carrying just under 1,500 containers, with 81 of those containers described as “dangerous” goods.

This photo provided by Sri Lankan Air Force shows the sinking MV X-Press Pearl at Kapungoda where it is anchored off Colombo port, Sri Lanka, Wednesday, June 2, 2021. Salvage experts were attempting to tow the fire-stricken container ship that had been loaded with chemicals into the deep sea as the vessel started to sink Wednesday. Water submerged the MV X-Press Pearl's quarterdeck a day after firefighters extinguished a blaze that had been burning for 12 days. (Sri Lanka Air Force via AP)

This photo provided by Sri Lankan Air Force shows the sinking MV X-Press Pearl at Kapungoda where it is anchored off Colombo port, Sri Lanka, Wednesday, June 2, 2021. Salvage experts were attempting to tow the fire-stricken container ship that had been loaded with chemicals into the deep sea as the vessel started to sink Wednesday. Water submerged the MV X-Press Pearl's quarterdeck a day after firefighters extinguished a blaze that had been burning for 12 days. (Sri Lanka Air Force via AP)

Environmentalist have warned that there's the potential for “a terrible environmental disaster” as hazardous goods, plastics, chemicals and oil could be released into the water and destroy marine ecological systems.

The fire erupted on May 20 when the ship was anchored about 9.5 nautical miles (18 kilometers) northwest of Colombo and waiting to enter the port. The navy believes the blaze was caused by the vessel’s chemical cargo, which it was carrying from the port of Hazira in India.

Sri Lankan police are investigating and a court in Colombo has banned the captain, the engineer and the assistant engineer from leaving the country. The government has said it will take legal action against the owners of the ship to claim compensation.