“It was an innocent evolution, where he helped with one minor thing, then one more on top of that, and all of the sudden, everyone thought he was a federal agent,” Mr. Schwartz said. “I’m not saying this was legal or lawful. But look, they were very, very effective while he was present. I don’t think Gerald is having the drug problem they were having. I’ve heard from some residents who were thrilled that he was there.”

There were numerous arrests during Mr. Jakob’s time in Gerald (the exact number is uncertain, local law enforcement officials said, as legal action surrounding the case proceeds), but Mayor Schulte said that Mr. Jakob had, in fact, gone to elaborate lengths to deceive local authorities, including Ryan McCrary, then the police chief, into believing that he was a federal agent  with the Drug Enforcement Administration, the Marshal’s Service or some other federal agency.

In addition to having a badge and a car that seemed to scream law enforcement, Mr. Jakob offered federal drug enforcement help, Mr. Schulte said, (a notion local officials said must have somehow grown out of their recent application for a federal grant for radio equipment) and asked Chief McCrary to call what he said was his supervisor’s telephone number to confirm Gerald’s need for his help.

When the call was placed, a woman  whose identity is unknown  answered with the words “multijurisdictional task force,” and said that the city’s request for federal services was under review, the mayor said. Mr. Schulte said he now suspects that Mr. Jakob adapted the nonexistent task force name from the “Beverly Hills Cop” movies starring Eddie Murphy.

“Not only were these officers taken in, but so was everybody else,” said Chet Pleban, a lawyer for Mr. McCrary and the other two members of the police force who lost their jobs after Mr. Jakob’s real identity came to light.

Of the firings, Mayor Schulte said, “Nobody wanted to, but the city’s lawyer recommended it.”

When residents first began noticing Mr. Jakob, he certainly looked the part. His hair was chopped short, residents recalled, and his stocky chest filled a black T-shirt he sometimes wore that read POLICE. They said he wore military-style boots, pants with pockets running down the legs and carried a badge (his lawyer said it was from a former job as a security guard in St. Louis). And his off-white Crown Victoria was decked out with police radios and internal flashing lights, residents said.