Four New York Times journalists missing in Libya have been located and were scheduled to be freed by military forces Friday, the newspaper reported, apparently ending a drama that underscored the perils of reporting amid the rolling tumult in the Middle East.

The journalists — two-time Pulitzer Prize winner Anthony Shadid, photographers Tyler Hicks and Lynsey Addario, and reporter and videographer Stephen Farrell — had been missing since Tuesday.

The Times reported Friday that the four were captured by forces loyal to Libyan leader Moammar Gaddafi after entering rebel-controlled eastern Libya without visas, a common practice among Western journalists covering the ongoing insurrection.

In its report, the Times cited comments about the release made by Gaddafi’s son, Saif al-Islam Gaddafi, in an interview with Christiane Amanpour of ABC News.

“You know, they entered country illegally and when the army, when they liberated the city of Ajdabiyah from the terrorists and they found her there and they arrest her because you know foreigners in this place,” said Saif Gaddafi, apparently referring to Addario, according to a transcript of the interview. “But then they were happy because they found out she is American, not European. And thanks to that she will be free tomorrow. But I told you that here the people are welcoming the American position and not the Europeans and the Arabs. We are very angry at the Europeans and the Arabs because they are happy with you if you are strong — they have contracts, they have deals and oil.

“If you are weak, everybody is against you. This time, the Americans are different.”

Shadid, a former Washington Post and Boston Globe writer, won Pulitzers in 2004 and 2010 for his deeply reported and elegantly written pieces on the war in Iraq and its aftermath.

His colleagues also were experienced foreign journalists.

Shadid was shot in the back in 2002 while reporting in the West Bank city of Ramallah. Farrell was captured by the Taliban in Afghanistan in 2009 and was later rescued by British commandos.

After they were reported missing, the Times says, the Libyan government pledged to locate them and release them unharmed if they had been detained by government forces. The four journalists were allowed to call their families Thursday night, the Times reported.

“We’re all, families and friends, overjoyed to know they are safe,” Bill Keller, the executive editor of the Times, was quoted as saying. “We are eager to have them free and back home.”