A Jehovah’s Witness whose online postings were intended to stir debate about the religion’s practices fears that he, or she, would be excommunicated and shunned by friends and family members if named publicly.

A federal magistrate in San Francisco has ruled that the self-identified Darkspilver can remain anonymous, except for identification to lawyers for the religion’s Watchtower publication, which says the posting violated its copyright.

“The First Amendment protects the right to anonymous speech,” U.S. Magistrate Sallie Kim said Friday. Although that right is not unlimited, she said, “Darkspilver has demonstrated significant harm if his identity were revealed publicly or even if it were revealed to Jehovah’s Witnesses in his congregation.”

She also said the constitutional right of free speech applies even though Darkspilver does not live in the United States. The suit seeking Darkspilver’s identity was filed by a U.S. company in a U.S. court, Kim said, and “the First Amendment protects the audience as well as the speaker.”

Although court filings do not identify Darkspilver’s gender, Kim said she used the male pronoun because the poster’s pleadings were filed under the name of John Doe. The religious organization sued San Francisco company Reddit, the website that Darkspilver used, to obtain the poster’s identity. Reddit sided with Darkspilver.

“This is an important victory for the rights of users everywhere to share and receive anonymous speech online,” said attorney Alex Moss of the Electronic Frontier Foundation, the privacy rights group that represents Darkspilver.

But she said neither her organization nor her client was happy with Kim’s decision to disclose Darkspilver’s name to lawyers for the Watch Tower Bible and Tract Society, along with an order that they keep the name confidential unless the magistrate approves disclosure to anyone else.

That’s no guarantee of secrecy, Moss said, and they are considering further actions to shield the client’s identity. She contended the copyright suit was merely a pretext for unmasking a critic.

Lawyers for Watch Tower, a company affiliated with Jehovah’s Witnesses, could not be reached for comment.

Darkspilver, a lifelong Jehovah’s Witness, has been using a Reddit forum for former members of the religion for several years to discuss religious issues “freely and openly,” Kim said, quoting court filings. The case arose from two recent posts that included an ad, seeking donations, and a chart, both taken from the religion’s official Watchtower magazine.

Darkspilver said the postings were meant to encourage “discussion about the organization’s tone, message, and fundraising practices.” Watch Tower, which publishes the magazine, said the posts violated its copyright and sought a court order to disclose the poster’s name.

In court papers, Darkspilver said critical voices in the faith, once identified, are often “disfellowshipped,” or excommunicated, an act that would “damage or destroy his relationships with friends and family who remain active members,” Kim said.

Although Watch Tower holds the copyright to the magazine ad, the magistrate said, it remains subject to “fair use,” which allows copyrighted materials to be quoted for public purposes such as criticism. Darkspilver had the noncommercial purpose of trying to provoke debate and did not diminish the publication’s value, she said.

On the other hand, Kim said, Watch Tower’s copyright case is not entirely baseless, and as it continues, “any harm to Darkspilver would be alleviated” if the poster’s identity was disclosed to the company’s lawyers “under an ‘attorney’s eyes only’ restriction.”

Bob Egelko is a San Francisco Chronicle staff writer. Email: begelko@sfchronicle.com Twitter: @BobEgelko