A man who killed a Minnesota sheriff's deputy over the weekend had been sought just a week earlier for allegedly terrorizing his wife.

A criminal complaint says Danny Leroy Hammond locked his wife inside their bedroom and aimed a pistol at her after she said she was leaving him.

The complaint says he forced her to lie in bed with him as he pointed the pistol at her and himself. The gun fired and a bullet hit a television set.

Hammond was charged last week with counts including kidnapping, assault and terroristic threats. It wasn't clear when he was arrested.

He was at St. Cloud Hospital early Sunday when he grabbed Deputy Martin Sandberg's gun and killed him. Hammond died after being subdued by hospital security.

KMSP reported that the 60-year-old Aitkin County Sheriff's Department veteran was born, raised and lived in the town of Aitkin, a town of just over 2,000 people 125 miles north of Minneapolis.

"His family's been neighbors of ours for years,” Richard and Marilyn Hesch, who also went to church with Sandberg, told the station. "It's going to be a tough one, especially for a small community like this."

Investigators are still trying to determine what led up to Sandberg's shooting by 50-year-old Danny Leroy Hammond. Drew Evans, superintendent of the Minnesota Bureau of Criminal Apprehension, said Hammond and Sandberg got into a struggle in Hammond's room at St. Cloud Hospital. Evans said Hammond was not handcuffed at the time.

The superintendent said Hammond was subdued by two hospital security guards with the help of another Aitkin County deputy, who had just arrived to relieve Sandberg.

"Several shots were fired during that struggle and then security officers were able to get into the room, and the suspect was tased with a Taser, and taken into custody," Evans said at a news conference. "After he was taken into custody he became unresponsive. Medical personnel performed lifesaving operations on him and he died at that time."

KMSP reported that Hammond, who lived near Aitkin, was being treated at the hospital for an undisclosed condition. 

Hammond had been convicted of felony crimes including escaping from custody in 1990, third-degree burglary in 1989 and terrorist threats in 1990, according to court records. All the convictions were for crimes committed in Aitkin County.

Sandberg had been with the sheriff's department since 1981 and an investigator for 20 years, Aitkin County Sheriff Scott Turner said Sunday.

"I hope that everyone can keep investigator Sandberg's wife and daughters in their prayers in the coming days," Turner added.

Evans and hospital vice president Kurt Otto declined to say why Hammond was being treated at the hospital in St. Cloud, which is about 60 miles northwest of Minneapolis. Otto said the hospital had asked the sheriff's office to send deputies to monitor Hammond because of the "seriousness" of the domestic incident, which happened sometime earlier in the week. They would not say how long Hammond had been in the hospital except that it was more than a day.

He said investigators had a lot of work ahead of them, including interviewing hospital staffers who were on duty at the time.

Minnesota Gov. Mark Dayton condemned the deputy's death and offered condolences to his family.

"I deplore the terrible, senseless murder of Deputy Sheriff Steven Sandberg," Dayton said in a statement.

A woman answering the phone at Sandberg's home said nobody from the family was ready to comment. Hammond's home does not have a listed phone number.

The Associated Press contributed to this report.

Click for more from Fox9.com.