PEORIA, Ill. — When Jon Daniel created a Twitter account spoofing the town’s mayor in March, he planned to entertain friends with a steady stream of occasionally profane and often sophomoric messages.

The Peoria native said he had no animosity toward Mayor Jim Ardis when he uploaded his official portrait to the page and started tweeting under the handle @peoriamayor. With Twitter hosting thousands of accounts parodying athletes, actors and politicians, Daniel decided Peoria’s biggest celebrity should have one as well.

“It was created to be a joke,” said Daniel, a 29-year-old father of two small boys. “I thought my friends would find it funny.”

29-year-old Jon DanielPhoto: AP

While Daniel’s friends were amused, Ardis was not. Records obtained under the Freedom of Information Act show how deeply Daniel’s musings upset officials as they tried to hold him criminally responsible for portraying Ardis as a foul-mouthed politician with a penchant for liquor, drugs and prostitutes.

Emails show Ardis and City Manager Patrick Urich demanded a police investigation into Daniel’s identity in an effort to stop the tweets. Their orders led to a raid on Daniel’s home, sparking a series of events that would eventually subject Peoria to widespread ridicule and make Daniel, a short-order cook at a local bar, the flag bearer for protected speech.

In a lawsuit filed this week, Daniel claims city officials violated his First and Fourth Amendment rights by ordering and conducting the raid. Another occupant of the house was arrested on marijuana possession charges after the search, but Daniel was never charged with wrongdoing.

The lawsuit does not seek a specific dollar amount, but accuses Ardis and six other city employees of targeting Daniel because he dared to lampoon the mayor. Such spoofs are typically protected under the First Amendment because they are considered a form of political speech and not intended to deceive anyone.

“Political parody is a great tradition in the United States — from Thomas Nast to Jon Stewart,” said Harvey Grossman, legal director for the American Civil Liberties Union of Illinois and Daniel’s lead attorney. “In a number of public statements, the mayor and Peoria officials have been unapologetic about their activities. The only way to hold these government officials accountable is to have a federal court rule that their actions violated the fundamental constitutional rights of our client.”

A defiant Ardis threatened his own defamation lawsuit Thursday, saying he needed to protect his name and family. Then — in perhaps the bizarre scandal’s most bizarre moment — the 55-year-old mayor gave a straight-faced reading of Daniel’s most off-color tweets, including messages that voiced enthusiastic support for strippers, tequila and crack pipes.

“There is no way for someone to know that what was being said under my name, picture and contact information was not coming from me,” Ardis told reporters. “My identity as mayor was stolen. Anyone reading the content would assume they were reading my comments as the mayor.”

There’s no evidence that anyone on Twitter believed the account to be Ardis’ official handle. The postings were often riddled with grammatical errors and misspelled words, suggesting they had not been composed by someone with a professional communications staff.

“Im bout to climb the civic center and do some lines on the roof who’s in,” one early tweet read.

Daniel says when people he didn’t know started following the account, he labeled it as a parody feed to avoid misunderstanding.

“The joke of the account was to have my fictional mayor saying things that no one would possibly think that Mayor Jim Ardis would say,” Daniel said.

Within two days of the account’s creation, the city manager sent an email to Sam Rivera, the city’s chief information officer, asking for his help in getting the account taken down.

“Someone is using the Mayor’s likeness in a twitter account,” Urich wrote in a March 11 email. “It’s not him. @Peoriamayor. Can you work to get it shut down today?”

Less than an hour later, Urich turned to Police Chief Steve Settingsgaard and asked him to have Detective James Feehan, a member of the department’s computer crimes unit, investigate the identity of the account’s creator. Settingsgaard quickly agreed. By 11 a.m. — about four hours after Urich first contacted the department — Feehan expressed doubts about whether any crime had been committed.

“I looked at the comments and photographs posted by the suspect. Nothing contained within amounts to criminal violations,” Feehan wrote in an email to his chief. “However, there are tweets posted by the individual which amount to defamation. Without a subpoena issued to Twitter to obtain the IP address of the account creator, there is not much else we can do. I did send Twitter the report of the impersonating account and requested it be removed asap.”

Settingsgaard passed the detective’s findings along to the mayor, though he doubted whether Ardis could meet the legal threshold for a defamation suit.

“This phony Twitter account does not constitute a criminal violation in that no threats are made,” the chief wrote. “I’m not sure if it would support a civil suit for defamation of character. I’m not an expert in the civil arena but my recollection is that public officials have very limited protection from defamation.”

Ardis was undeterred. He sent an email the next day to Urich, Rivera and Settingsgaard, urging them to get the account taken down.

“Any chance we can put a sense (of) urgency on this?” Ardis asked.

Urich echoed his boss’ wishes in a reply sent three minutes later.

“Quickly please,” he wrote.

Feehan and Rivera, however, already had separately reported the fake account to Twitter, which allows for parody accounts as long as they’re labeled as such.

In the meantime, Feehan continued to research the law regarding impersonation and came across a new state statute that prohibits people from falsely identifying themselves as public officials. Though it was only a misdemeanor crime, it would give the department the legal muscle it needed to force Twitter’s cooperation in shuttering the account.

If Ardis wanted to prosecute, they would proceed with taking a formal complaint.

“i absolutely will prosecute,” Ardis wrote in an email to Settingsgaard. “bring it on. thanks chief.”

Ardis’ decision allowed police to subpoena Twitter, which turned over the IP address used to access the account and temporarily suspended the account. With that information secured, the department subpoenaed Comcast for the account holder’s name and address.

On April 15 — more than three weeks after the @peoriamayor account was suspended — Peoria police raided the home where Daniel lived. Four officers tore the house apart, as records show they searched for any and all electronics capable of sending the offensive tweets. The search warrant also allowed officers to scour the house for drugs, as they believed “cocaine, heroin, (or) drug paraphernalia” could be present in the home because one of the tweets included a picture of a “white powdery substance” being cut by a razor blade.

In the end, police confiscated four computers, four iPhones, an iPad and two Xboxes belonging to several people who lived at the house. They also found a “broken black ashtray with green seedy substance” and a “large gold gift bag with five sandwich bags containing a green leafy substance,” according to police reports. Tests showed the seedy substance was marijuana, officials said.

Authorities charged Jacob Elliott, whose name was on the home’s Comcast account, with possession of marijuana. His case is pending.

Daniel, who was not home during the raid, showed up at the police station later that evening and declined to answer questions without a lawyer present. He later acknowledged he created the Twitter account, but he was never arrested.

“When I got home, I discovered that my room had been searched,” he said. “… The next few days were like a blur for me. I was very scared and helpless. I could not sleep. I had a sense of impending doom.”

City officials, however, were convinced they acted properly, records show. No amount of criticism from the media, residents or even Peoria City Council members could dissuade them.

“For anyone in the media who would like to say that we should not prosecute this, I challenge them to print or cite what was written there word for word,” said Settingsgaard, who recently resigned to take a job in the private sector. “It was patently offensive.”

Three days after the raid, with the public backlash gearing up, the would-be case against Daniel unraveled completely. In an email sent to Ardis and Urich titled “Twitter problem,” Settingsgaard broke the news to his bosses.

“Det Feehan is going to review with (State’s Attorney Jerry) Brady on Monday but there may be an internet exception to the impersonating statute,” he wrote. “If it is exempt, everyone missed it from the investigators to the SAO (the state’s attorney’s office) and the judges.”

The controversy — dubbed “Twittergate” in downstate Illinois — spurred headlines around the country, as other Ardis parody accounts began popping up on social media. First Amendment advocates said they believed it was the first time police raided a private home over a parody account.

At a city council meeting after the raid, Ardis faced harsh words from constituents and other elected officials for nearly an hour. Councilman Jim Montelongo chided Ardis for not laughing off the account like Chicago Mayor Rahm Emanuel did in 2010-11 when a parody account portrayed him as a foul-mouthed, largely unpleasant politician.

“This was truly just a Twitter parody account, a cyberprank,” Montelongo said.

Public reaction was even more harsh, as emails from all over the world were sent to Ardis’ mayoral address.

“Just to give you heads up, sir: I will be mocking you at the dinner table this evening,” one note read. “I will await your stormtroopers with some fresh coffee and rolls. Please phone ahead.”