A federal judge today dismissed a criminal case against a man accused of stalking a religious leader on Twitter, ruling that the "uncomfortable" speech included in his tweets were protected by the Constitution.

William Lawrence Cassidy was accused of using the microblogging site to harass and cause "substantial emotional distress" to a religious figure identified in court papers only by the initials "A.Z." Some of the more than 8,000 tweets Cassidy sent included predictions of A.Z.'s violent death.

"Although in bad taste, Mr. Cassidy's Tweets and Blog posts about A.Z. challenge her character and qualifications as a religious leader," U.S. District Judge Roger W. Titus wrote in the 27-page ruling (PDF). "And, while Mr. Cassidy's speech may have inflicted substantial emotional distress, the Government's Indictment here is directed squarely at protected speech: anonymous, uncomfortable Internet speech addressing religious matters."

The New York Times identified the target of the tweets as Alyce Zeoli, a Buddhist religious leader whose attorney told the newspaper that her client was "appalled and frightened by the judge's ruling."

The Electronic Frontier Foundation, a nonprofit Internet advocacy group, praised the ruling as a victory for free speech on the Internet.

"We are grateful that the court recognized the critical First Amendment issues at stake in this case," Hanni Fakhoury said in a statement. "Law enforcement may have disagreed with the tone and content of Mr. Cassidy's speech, but the police hauling a Twitter user to jail for offending a public figure was the greater harm."