Hand guns for sale at a gun shop in Merrimack, N.H. (AFP/Getty Images)

An anonymous blogger who uses the pseudonym “Doe Publius” knew he would stir controversy when, in July 2016, he published a “tyrant registry” listing the addresses and home phone numbers of 40 California lawmakers who supported a new gun control law in the state.

“Isn’t that dangerous?” Publius asked rhetorically in a post on his blog, The Real Write Winger. “What if something bad happens to them by making that information public?”

In California, courts have ruled that similar dossiers targeting abortion providers are tantamount to death threats. Publius published his list anyway. “These tyrants are no longer going to be insulated from us,” he wrote.

The post was quickly picked up on another gun rights blog, and within days, several of the named lawmakers reported receiving threatening phone calls and social media messages. California’s legislative counsel responded by ordering that WordPress, the blogging platform Publius used, remove the post, citing a state law, based on safety concerns, that restricts publication of government officials’ personal information.

WordPress obliged.

But on Monday, a federal court ruled that the “tyrant registry” was protected speech. In a lawsuit brought by Publius, Judge Lawrence J. O’Neill of the U.S. District Court for the Eastern District of California said the post and its republishing by another blogger were “a form of political protest.”

“The legislators’ home address and telephone number touch on matters of public concern,” the judge said in the 38-page opinion.

“There is no dispute that Plaintiffs lawfully obtained and truthfully published information that was readily available online,” O’Neill continued. “When lawfully obtained, the truthful publication of that information falls within the First Amendment’s ambit.”

The judge issued a preliminary injunction barring California from enforcing the state law used to censor the post. The law, he said, was likely unconstitutional because it wasn’t “narrowly tailored” to avoid trampling protected speech. Publius and the other plaintiff, blogger Derek Hoskins, had a good chance of winning the case on First Amendment claims, the judge found.

The California legislative counsel’s office has until March 10 to decide how it wants to proceed in the case. A spokesman for the state assembly told the Associated Press that the office was evaluating its next steps.

The law that prompted Publius to post the “tyrant registry” created a database tracking all ammunition purchases in California. The database includes addresses, phone numbers and driver’s license information for anyone who buys or transfers ammunition in the state. Democratic Gov. Jerry Brown signed it into law on July 1, 2016, along with several other gun control measures.

Using public records searches on zabasearch.com, Publius compiled personal information on lawmakers who supported the legislation. The post went live on July 5, and was soon after reposted on Northeastshooters.com, a New England firearm forum run by Hoskins.

“These are the people who voted to send you to prison if you exercise your rights and liberties,” the post read. Names would only be removed, it said, “upon the tyrant’s death” or if they voted to repeal the legislation in question.

One of the named lawmakers said he received a call from a male speaker saying, “I know your address and don’t you wish you knew who I am?” Two others said they received menacing social media messages, one of which read, “The People will be acting on this.”

On July 8, Deputy Legislative Counsel Kathryn Londenberg sent WordPress a written demand to remove the post.

“The Senators and Assembly Members whose home addresses are listed on this Web site fear that the public display of their addresses on the Internet will subject them to threats and acts of violence at their homes,” the demand read. Londenberg sent Hopkins a nearly identical missive.

With the help of Firearms Policy Coalition, a gun rights group, Publius and Hopkins sued, arguing their First Amendment rights were violated.

In a post on The Real Write Winger Monday, Publius cheered Judge O’Neill’s ruling, calling it “not just a win for myself, but a win for freedom of speech and political protest.” He stood by his decision to create the “tyrant registry.”

“Much like the Sex Offender Registry, this common sense tyrant registration addresses a public safety hazard alerting the public of tyrants who have violated the civil rights and liberties of people in their communities,” he wrote.

The ruling comes after two other California laws were recently pared back by courts on First Amendment grounds. Last week, a federal judge in San Francisco blocked California from enforcing a law that prohibited the popular movie website IMDb from publishing the ages of Hollywood actors. Proponents of the law argued it was necessary to prevent age discrimination, but the judge said it likely violated the First Amendment.

In September, California repealed a law that made it a crime to rebroadcast proceedings from the California Assembly in political advertisements, after a federal judge found that it, too, ran afoul of free speech rights. The law was challenged by the Firearms Policy Coalition, which helped bring Publius’s case.

More from Morning Mix

Subway chicken in Canada was part meat, part something else, according to DNA analysis

Top tweeted moments from the joint session of Congress

Obamas sign book deals with Penguin Random House