Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

In death, Illinois police Lt. Joseph Gliniewicz was praised by his fellow officers as a “hero” — a cop's cop who took pride in mentoring kids to strive for their best before, police said, he was gunned down during a foot chase in September.

But the narrative personifying his “G.I. Joe” nickname took a stunning turn Wednesday: Police announced the 30-year veteran officer in the Chicago suburb of Fox Lake killed himself after years of criminal activity, including embezzling money through the Explorers youth program.

Related: Illinois Police Officer's Death 'to Be Ruled Likely Suicide'

Gliniewicz fatally shot himself as part of a "carefully staged suicide" in the line of duty, said George Filenko, commander of the Lake County Major Crimes Task Force. The veteran officer was feeling the heat, he said, as village administrators started taking a close look at the Explorer program's finances.

Over the past seven years, Gliniewicz, 52, had funneled an unspecified "five-figure amount" from the Explorers for personal purposes — including mortgage payments, travel expenses, gym memberships, adult websites and loans to associates, Filenko said at a news conference.

After poring over emails and text messages in search of clues, police say they determined Gliniewicz had been forging signatures on documents and communicating about his illicit acts with at least two other people. The case remains open.

"There are no winners here. Gliniewicz committed the ultimate betrayal," Filenko said. "He behaved for years in a manner contrary to the image he portrayed."

Electronic communications revealed that the Army veteran knew village administrators were digging into his involvement with the Explorers and that he began feeling the pressure about six months ago.

The day before police say he killed himself, the village administrator, Anne Marrin, sent him an email regarding inventory. His story was on the verge of unraveling.

So as part of the elaborate ruse, Filenko said, he left his pepper spray, baton and glasses strewn in a trail of strategically placed items before shooting himself twice at the crime scene in a remote, marshy area of Fox Lake.

Gliniewicz knew what he was doing, according to investigators: He had experience mocking up such scenes through the Explorers. The way he had arranged the items had initially thrown police off to believe he had been in some sort of physical struggle.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"This staged suicide was the end result of extensive criminal acts that Gliniewicz had been committing," Filenko said.

A statement released by the officer's family later Wednesday said, "Today has been another day of deep sorrow for the Gliniewicz family."

And a company that printed hundreds of signs in support of Gliniewicz said, "We knew him only as a dedicated officer, a caring friend and passionate law enforcement officer."

Someone wrote "liar" on a poster honoring Lt. Joseph Gliniewicz. The Fox Lake police officer had been called a hero after his death on Sept. 1, but it was revealed Wednesday he committed suicide after years of embezzlement. WMAQ

But after the corruption news was revealed, someone defaced at least one of the signs with the words "LIAR" scrawled over Gliniewicz's face.

Gliniewicz's death on Sept. 1, which touched off a massive manhunt, had been shrouded in mystery. Police initially released limited information, saying they didn't want to compromise the investigation.

Photos: Massive Manhunt Targets Suspects in Cop Killing

When the Lake County coroner released new details a week after the shooting — that he couldn't rule out a suicide and Gliniewicz died from "a single devastating gunshot wound" — authorities blasted him publicly for being "irresponsible."

Police were saying this much: Gliniewicz was on patrol when the officer reported he saw three men and stopped to question them at 7:52 a.m. He radioed for backup about three minutes later, with the trio described as two white males and one black male.

But by the time other officers arrived, Gliniewicz was found dead at the scene. In less than 15 minutes, the supposed suspicious men managed to vanish on foot, police said.

At first, authorities said the officer's service weapon and pepper spray had gone missing. Then they said his gun was recovered at the scene.

Police said Gliniewicz was shot twice with his weapon: once on the right side of the front of his bulletproof vest, and then in the upper left chest — believed to be the fatal shot.

Related: Authorities: 'Struggle Took Place' Before Fox Lake Officer Was Shot to Death

Last month, following a manhunt that at its height included several SWAT teams, federal agents and helicopters, Lake County officials said that they were continuing to treat his death as a homicide — although other possibilities were still on the table.

Authorities on Wednesday vigorously defended how they have handled the case after maintaining for more than two months that Gliniewicz was the victim of a tragic murder. At a news conference, Filenko was asked if he was embarrassed by how police agencies were unable to see through what Gliniewicz had apparently done.

"The embarrassment comes to me personally that this is the first time in my career that I've felt ashamed by the acts of another police officer," Filenko said.

Meanwhile, as the costly manhunt yielded no results, Gliniewicz was being remembered by colleagues for how he presented himself: as a loving, married father of four, dedicated to his job and mentoring youth through the Explorers program.

"There are no winners here. Gliniewicz committed the ultimate betrayal."

"When we were growing up, we always knew he was a hero — but now the whole nation knows him as a hero," his brother, Micheal Gliniewicz, said at his funeral.

Gliniewicz was due to retire in August, but was asked to stay on an extra month. One of his sons had previously said that he “never once” would consider committing suicide.

The family said in their statement Wednesday that they have "cooperated with the Task Force's investigation and will not comment at this time. The Gliniewicz family requests that their privacy be respected as they continue to cope with the loss of the beloved husband and father."

Sign Appeal, which printed hundreds of signs in support of Gliniewicz after his death, seemed shocked by the revelation. The company said in a statement that it continues to support the men and women in law enforcement.

"We stand by them with proud support and dedication," the company said, adding that it wishes nothing but closure for those affected by his death.

Filenko declined to discuss potential pension benefits that Gliniewicz's widow stands to collect. A pension board official told NBC News on Wednesday that she had yet to file a claim.

Neighbors in Fox Lake, meanwhile, were left to make sense of the news. Some lashed out, defacing signs to read, "G.I. Joke."