CHICAGO (AP) — Jon Daniel was watching cartoons with one of his sons when he created a spoof Twitter account in the name of the Peoria mayor. Out of boredom, he said, he soon began sending profane messages about sex, drugs and alcohol.

Daniel never intended for the fake account to be seen by anyone other than his friends, and it never attracted more than a few dozen followers. But within weeks the raunchy parody led to a police raid of his home and ignited a debate about online satire, free speech and the limits of a mayor’s power.

Now Daniel is taking the matter to federal court in a lawsuit alleging the city violated his civil rights.

The 29-year-old, who works as a tavern cook in his hometown, modeled the tweets on those of other fake accounts that lampoon sports stars by tweeting in a voice that appears drunk. He was dumbfounded when Twitter suspended the account.

“I was like, ‘Well, OK, that’s the end of that chapter,'” he told The Associated Press.

Except it wasn’t. A few weeks later, four police officers acting on a complaint from Mayor Jim Ardis raided the home Daniel shares with several roommates, seizing computers and smartphones.

Daniel discovered that the type of spoof that might be tolerated — or even welcomed as flattery — in Chicago, New York or Hollywood can play differently in smaller cities in middle America, like Peoria, a manufacturing center of 120,000 people.

After the April raid, Peoria’s public prosecutor declined to file charges, but with the backing of the American Civil Liberties Union of Illinois, Daniel filed the lawsuit, which he hopes sends a warning to others in power.

The raid unleashed waves of criticism — much of it on social media, where fake profiles of celebrities and prominent politicians have long proliferated.

Authorities sought warrants on the basis that Daniel falsely impersonated a public official. The fake account used the handle @peoriamayor and included Ardis’ official photo, email address and a link to the mayor’s bio on the city’s website. Ardis saw the account as an attempt to steal his identity.

Daniel only added the parody label — required under Twitter’s terms of service — a few days after creating the account when he noticed that people he did not know were starting to follow him.

Even without the label, an account that is clearly a parody is protected, legal experts say.

The tweets — one said, “Im (sic) thinking it’s tequila and stripper night” — expressed a preoccupation with sex and drugs that no reasonable person could have concluded came from the actual mayor, the lawsuit argues.

It would have been a more difficult question if Daniel had been talking about policy issues, said Jack Lerner, an assistant law professor at the University of California at Irvine, though he does say Daniel was “unwise” not to include a clear parody label from the start.

For Daniel, the line is simple. “You can’t do terrorist type of things or threaten people,” he said in an interview at the ACLU office in Chicago. “But a simple joke, a parody, mocking somebody, that’s obviously not illegal.”

Twitter suspended the account after the city threatened to file a lawsuit.

City attorneys insist authorities had probable cause to seek Daniel’s identity from Twitter and to raid his home. They’ve asked a judge to dismiss the case.

Ardis, Peoria’s mayor for the last nine years, said he felt the tweets “went way over the line” and made him “a victim of sexual doggerel and filth.”

“And perhaps I’m guilty of reacting as a man, as a father and as a husband rather than as a government official with whom constituents might disagree,” he told a City Council meeting.

Other parody accounts have drawn scrutiny, although none apparently led to police raids. Police in Starkville, Mississippi, recently subpoenaed Twitter for information about the person behind an account in the name of Vice Mayor Roy Perkins.

In Arizona, state Rep. Michelle Ugenti introduced legislation in 2012 that would have made it a crime to create an online profile in someone else’s name with the intent to “harm, defraud, intimidate or threaten.” Ugenti was the target of a Twitter parody but said her bill, which died in committee, was not meant to affect parodies.

Not all phony profiles are badly received.

When former White House Chief of Staff Rahm Emanuel was running for mayor of Chicago, a journalism professor crafted a fake, foul-mouthed Twitter version of Emanuel. The real Emanuel acknowledged the tweets sometimes captured his attitude on the campaign trail. He eventually met the man behind the account and even pledged to donate $5,000 to a charity of his choice.

And now, Twitter has at least a dozen Peoria mayor accounts — all fake.

Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.