(CNN) When the California legislature passed a law last year to create a registry to track all ammunition purchases and gun transfers in the state, a right-wing blogger responded by publishing a "tyrant registry" -- a listing of the names, home addresses and phone numbers of the 40 lawmakers who voted for the bill.

Doe Publius, a pseudonym for the writer behind the Real Write Winger blog , urged gun owners to share the information and said lawmakers' names would remain on the list until the state registry was removed "or upon the tyrant's death."

On Monday, a federal judge ruled the blogger was within his First Amendment rights to post those names.

'I know your address'

Legislators tried to have the information squelched.

According to the suit, at least four legislators said they received phone calls from a man who asked them, "I know your address, and don't you wish you knew who I am?"

A legislative lawyer sent a letter to WordPress, the web hosting company, demanding the blog posting be taken down because of state law 6254.21(c).

That law says elected officials' home addresses and phone numbers can't be published on the internet "intending to cause imminent great bodily harm." If officials feel they or family members are threatened, they only have to describe the threat in writing to demand the information be removed, the law says.

WordPress quickly complied.

Defiant stance

Publius filed a federal lawsuit August 5 against the legislative counsel, Diane F. Boyer-Vine.

"Not only are these tyrants going after your 2nd Amendment rights," Publius wrote on his blog , "but they have their eyes on your 1st Amendment rights as well."

Later Publius was joined in the suit by Derek Hoskins of Massachusetts, proprietor of the website Northeastshooters.com, which also published the "tyrant registry." Hoskins had taken down the list after receiving a demand letter from the legislative lawyer.

A temporary injunction

On Monday, US District Judge Lawrence J. O'Neill issued a temporary injunction that stopped the state from applying the law against the bloggers.

"At its core, plaintiffs' speech is a form of political protest," he wrote. "The court therefore finds that the legislators' home address and telephone number touch on matters of public concern in the context of plaintiff's speech."

"Plaintiffs' means of protesting the legislation is by compiling their own 'database' of the legislators' residential addresses and phone numbers," the judge wrote. "That information is not just integral to their message, it is their message."

O'Neill also noted that Publius obtained the addresses and phone numbers from an easily available online source, which made it protected under the First Amendment. The bloggers probably would win if the case went to trial, he said.

'A win'

"This is not just a win for myself, but a win for freedom of speech and political protest," Publius posted on his blog . Publius and Hoskins did not reply to a request for comment.

The Firearms Policy Coalition, which says it funded the legal action, praised the ruling. "We are delighted that Judge O'Neill saw the statute and the State's enforcement of it for exactly what it was: an unconstitutional restriction on free speech," group President Brandon Combs said on the FPC website

Boyer-Vine, the legislative counsel, said by email that "it is the policy of our office not to comment on pending litigation."