OGDEN, Utah -- The man accused of killing an Ogden police officer and wounding five others in a shootout was found hanging in his jail cell.

Weber County Attorney Dee Smith said at a news conference Friday that Matthew David Stewart was found at 12:50 a.m., when a corrections officer was making her hourly rounds. He was hanging by a bed sheet, Smith said, and his death appears to be a suicide.

The Utah Department of Public Safety will investigate the death, and another county attorney will review that investigation at its conclusion, he said.

Weber County Sheriff Terry Thompson defended his jail, saying that Stewart was "treated in a humane and professional way" while incarcerated. He said Stewart had been offered mental health treatment on numerous occasions, but refused it every time.

In a posting on Facebook, Stewart's family said he died "after a long and courageous battle with a corrupt and arrogant judicial system.

"After the illegal assault on his home by a gang of thugs and his inhumane treatment at the Weber County Correctional Institute,along with the recent loss of an unfair and unjust ruling by the court, Matthew gave up hope of his ever getting justice in his case," the family said in the posting.

Stewart was accused of opening fire on agents from the Weber-Morgan Narcotics Strike Force who entered his home to serve a drug-related search warrant on January 4, 2012. Agent Jared Francom was shot and killed during the raid.

With Stewart's death, Smith said he was free to discuss details of the shooting. He said agents with the strike force learned that Stewart had an "elaborate" marijuana grow operation going inside his home. Officers obtained a "knock and announce" search warrant.

Smith said officers went into the home after no one answered and began to clear the rooms. As they were preparing to clear the last room, Smith said, Stewart opened fire and hit two officers.

Ogden police officer Jared Francom engaged Stewart, the county attorney said, in an effort to rescue his colleagues.

"He was shot seven times," Smith said.

Disputing claims by Stewart's supporters that the officers were the victim of "friendly fire," Smith said ballistics did not show that.

"Every bullet that struck an officer was fired from Mr. Stewart's gun," Smith said, adding that Stewart fired 31 shots -- 17 of which hit officers.

Smith also discounted claims that Stewart had been surprised and believed the officers were burglars. The prosecutor insisted that the officers were wearing identifying gear and even noted that Ogden police officer Michael Rounkles ran into the home to rescue his colleagues in full uniform -- and was shot.

"These officers were heroic and they followed the law every step of the way," Smith said.

In a statement, Francom's widow, Erin, offered condolences to the Stewart family.

"Now that Mr. Stewart has done this, he will not have his day in court, nor will my children, the rest of my family or everyone else that has been affected," she wrote. "He now has to answer to a higher power and I will keep faith in knowing that."