A warning to people who post comments online: Anonymous is not forever.

A Philadelphia judge has ordered the owners of Philly.com - who also own The Inquirer and the Philadelphia Daily News - to disclose the identity of a person who posted a comment online.

The ruling came in a defamation suit filed by John J. Dougherty, the powerful head of Local 98 of the International Brotherhood of Electrical Workers.

In October 2012, Dougherty sued over a comment posted two months earlier on a Daily News blog that described a public feud involving Dougherty. The comment identified Dougherty by his well-known nickname, "Johnny Doc," and called him "the pedophile."

Dougherty sued the anonymous poster, and his lawyers subpoenaed Philadelphia Media Network, Philly.com's parent company, to supply the person's identity.

Mark Block, a spokesman for Interstate General Media, corporate parent of PMN, referred all questions to Eli Segal, an attorney for the company.

Segal said that after receiving the subpoena, the company contacted the anonymous poster to make sure he or she got notice of the lawsuit and hired a lawyer. He said lawyers for Dougherty and the person who posted the comment presented their arguments to Common Pleas Court Judge Jacqueline F. Allen.

On Feb. 26, Allen ordered the news company to disclose the poster's identity, along with any comments he or she posted from Aug. 10, 2012, through this January.

According to court filings, Dougherty's lawyers had sent a subpoena to PMN requesting that the company reveal the poster's identity. A lawyer for the company said it would not do so without a court order.

Philip L. Blackman, a lawyer for the person who posted the comment, could not be reached. In court filings, he argued that his client's comments were protected by the First Amendment. Blackman said the description of Dougherty was not "defamatory per se."

Dougherty's lawyer, Joseph R. Podraza Jr., called Allen's ruling "absolutely appropriate."

"I think it does bring accountability back to people who post things online, and I hope it disposes of the notion that just because you're anonymous, you can say defamatory things about other people and not be held accountable for it," he said.

Although cases demanding the identity of anonymous Internet scribes are not common, they are becoming more so in what experts call a developing area of law.

David Greene, a lawyer for the San Francisco-based Electronic Frontier Foundation, which monitors and provides legal assistance in cases involving the Internet and constitutional rights, said state appeals courts have been developing case law in this area for more than a decade.

Greene said such decisions basically require trial judges considering such requests to balance the needs of the person suing against the First Amendment rights of the poster.

In the Dougherty case, the union leader's lawyers contended that he had a defamation claim likely to succeed at trial but no way of communicating with or identifying the person being sued.