By Yeganeh Torbati

WASHINGTON (Reuters) - The Pentagon on Friday updated its law of war manual after a previous version came under fire for appearing to allow commanders to treat journalists as belligerents or spies.

The U.S. Department of Defense manual, the first and most comprehensive of its kind, was first released last June. It compared some of the tasks of journalism to spying or other hostile actions by an enemy.

The manual said some journalists may be considered "unprivileged belligerents" -- a legal category with fewer protections than combatants, such as prisoner-of-war status.

"Reporting on military operations can be very similar to collecting intelligence or even spying," one passage of the manual said.

Press freedom advocates said the manual's wording blurred the line between journalists and combatants and gave commanders the authority to detain reporters without charge.

They also warned that it would erode U.S. credibility abroad at a time when journalists are being targeted by governments and militant groups.

Sixty-nine journalists were killed for their work in 2015, according to the Committee to Protect Journalists, up from 61 in 2014. In 2015, 199 journalists were being detained worldwide, compared to 221 in 2014.

After the manual's release last year, news organizations including Reuters met with Pentagon officials to protest the language and ask for changes.

The revised manual provides greater detail on the legitimate purposes that journalists serve and makes clear that journalists have all the rights of civilians.

Press freedom groups, including CPJ and Reporters Without Borders, praised the revisions. Advocates said the new manual acknowledged journalists’ right to interview enemy combatants and placed the onus on commanders to discern between the actions of reporters and combatants.

“These are major changes,” said Frank Smyth of the CPJ. “This affirms the rights and the practice of open and independent reporting on the battlefield.”

The Pentagon eliminated the passages comparing reporting to spying or hostile acts, but gives specific examples of how an act of reporting could result in the loss of civilian status.

Journalists could still be considered unprivileged belligerents, the manual states, if they were a member of a non-state armed group and were carrying out propaganda "or other media activities."

Journalists could also lose their civilian status in certain cases, such as relaying target coordinates for an artillery strike against opposing forces, the manual said.

The new manual also eliminates language that called for journalists to seek permission from "relevant authorities" for their work "to avoid being mistaken for spies."

That passage drew criticism for setting an unrealistic standard for war reporting, in which frontlines can shift quickly. To cover conflicts in Libya or Syria, for instance, reporters often have to cross borders illegally.

Pentagon officials also said they would be willing to revise the manual again if needed.

"The department's mission is to defend the very freedoms that journalists exercise," the Pentagon's top lawyer, Jennifer O'Connor, said in a statement. "We have learned a lot during this process, and the department and the manual are better off for the experience."

(Reporting by Yeganeh Torbati. Editing by David Rohde and Clive McKeef)