Updated

The mother of an Alabama man accused of shooting two sheriff's deputies wrote of his increasingly erratic and threatening behavior in three requests to have him placed in mental institutions against his will in recent years, according to court documents that have surfaced since the shooting that left one of the men dead.

Hundreds of mourners lined the streets and packed a civic center to say goodbye to the slain deputy Tuesday as more details of the suspect's troubled past emerged.

Baldwin County Sheriff's officials say Michael Jansen, 53, shot and killed Deputy Scott Ward and wounded Deputy Curtis Summerlin on Friday afternoon before the officers returned fire and killed Jansen. A third deputy was unhurt.

Court papers show Jansen's mother, 84-year-old Helen Jansen, had tried for years to get mental health treatment for him. Since 2009, the mother filed three petitions to have her son involuntarily committed to mental institutions. He was committed twice in 2010.

The court records paint a picture of a troubled man who once cut himself so badly he required more than 100 stitches and 37 staples to close the wounds. Another time Jansen stood in a road making obscene gestures at motorists. He claimed to be a Marine general and believed psychiatric medicine was "poison." His mother said he was verbally abusive and uncooperative toward her efforts to help him, according to the court records.

A psychiatrist wrote in 2010 that Jansen was bipolar, had manic episodes and was dependent on marijuana and alcohol.

Despite the finding, authorities have said it wasn't necessarily illegal for him to own the gun he used to shoot the deputies. Under Alabama law, person-to-person gun sales are largely unregulated and mental patients are only listed in a national database for background checks by firearms retailers in cases where a law enforcement officer has testified against the mental patient or the patient has a history of misusing firearms.

The federal Bureau of Alcohol, Tobacco, Firearms and Explosives is trying to determine who owned the gun and how it was obtained.

"It sounds like the problem is that folks knew he was dangerous, but our weak gun laws allowed him to be armed," said Daniel Vice, an attorney for the Brady Center to Prevent Gun Violence, a national lobbying group.

He said the federal law is designed to prevent someone who is involuntarily committed to a mental institution from owning a gun.

"It was illegal for him to possess a gun but there is a loophole that, if you are buying a gun from a private seller, there is no background check required. It is still illegal to buy the gun, but there is no way the seller would know that," Vice said. "These preventable shootings happen over and over."

When Helen Jansen called for help on Friday, she said her son was distraught and that he could not be subdued. Paramedics sought backup from the three deputies as they tried to treat Jansen. Investigators said the deputies had a lengthy conversation with Jansen before he pulled out a gun.

Members of Jansen's family said Tuesday they didn't want to talk about the case.

The court records show Helen Jansen was increasingly worried about her son in the petitions for his involuntary commitment filed from December of 2009 to April 2010.

In the first petition on Dec. 15, 2009, Helen Jansen said that her son would not take his medications, was "extremely depressed," told people he was a Marine Corps general who had served in Afghanistan and had been arrested for making obscene gestures to passing motorists. The petition described him as: "A real and present threat" to himself and to others. A judge quickly approved the petition, but it was dismissed on Jan. 12, 2010, after a psychiatrist wrote that he was taking his medications and could be treated on an outpatient basis.

Helen Jansen petitioned for involuntarily commitment again on Feb. 3, 2010. She wrote that he was not keeping his appointments with mental health workers, had become verbally abusive toward her and had left the burners on his stove on while turning up the heater and opening all of the doors and windows. The judge approved the petition and agreed that Jansen presented a substantial threat of harm to himself.

A month after Jansen was released from the treatment, his mother petitioned for help again writing that her son was "a seriously dangerous person," and that "for the safety and well being of the community" he should be in a mental institution. The April, 12, 2010 petition came after an apparent suicide attempt in which he cut himself on the arms and neck with a razor.

Records show that he was discharged from inpatient mental health treatment on July 28, 2010. It is unclear whether Jansen had any more treatment after his discharge.

Jansen did not have a violent criminal history, only minor drug and alcohol-related convictions.

Mourners remembered Ward on Tuesday for his service to his country and his community. The 15-year Baldwin County Sheriff's Office veteran was a member of the SWAT team and had served in Afghanistan through the Coast Guard Reserve.

Ward spent his life in public service and died trying to help others, said Baldwin County District Attorney Halle Dixon.

Sheriff Huey "Hoss" Mack said Ward wasn't the deputy responsible for responding to the call from the Jansen residence for help, but Ward was in the area and wanted to support his fellow deputies.

Mack choked up at news conference on Monday while paying tribute to his longtime friend.

Summerlin, the wounded deputy, was shot in his arm and leg and was in stable condition on Tuesday following two surgeries.