TRIPOLI, Libya — The four New York Times reporters held captive in Libya were freed into the custody of Turkish diplomats early Monday, the newspaper confirmed.

The reporters went missing from the country’s east on March 15. They were Beirut bureau chief and two-time Pulitzer Prize winner Anthony Shadid, reporter and videographer Stephen Farrell, and two photographers Tyler Hicks and Lynsey Addario.

“The Libyan government released four detained New York Times journalists Monday, six days after they were captured while covering the conflict between government and rebel forces in the eastern city of Ajdabiya,” the paper said.

“They were released into the custody of Turkish diplomats who were accompanying them out of Libya. Like many Western journalists the four had entered the rebel-controlled eastern region of Libya without visas over the Egyptian border to cover the insurrection against Col. Moamar Ghadafi. They were detained by forces loyal to Colonel Ghadafi in Ajdabiya,” the paper added.

The release was first announced by the Turkish ambassador to the US on his Twitter feed. Namik Tan said that the four reporters were freed Monday and would head to the Libyan border to be handed over to US officials.

The release was also confirmed by Turkish Foreign Minister Ahmet Davutoglu, who said they had been handed over to Turkey’s embassy in Tripoli.