A North Dakota police officer died Thursday of a gunshot wound suffered while responding to a domestic disturbance hours earlier, becoming just the second Fargo officer to die in the line of duty and the first in more than a century.

Officer Jason Moszer, 33, a six-year veteran of the force with a wife and two children, died about 12:45 p.m. Moszer was hit while standing outside a house near downtown about 7 p.m. Wednesday, and police had warned overnight that he wasn't expected to survive.

Family members visited him in a hospital early Thursday to say goodbye, Fargo Police Chief David Todd said.

Fargo Mayor Tim Mahoney said in a statement the city was "profoundly saddened" by the death of Moszer, who won a Silver Star commendation after he and another officer were credited with risking their lives in 2011 to rescue two children from an apartment fire.

"A tragedy affecting our men and women in uniform impacts our entire community," Mahoney said in a statement.

Moszer graduated from Fargo South High School in 2001 and from North Dakota State University in 2009.

US Fargo Standoff

This undated photo released by Fargo Police Department shows officer Jason Moszer, who was shot during a standoff in Fargo, N.D. with a domestic violence suspect. Moszer later died in hospital. (Fargo Police Department via The Associated Press)

The suspected shooter, Marcus Schumacher, 49, was found dead shortly before dawn Thursday. Police said they weren't sure whether Schumacher died of a police bullet or shot himself.

Schumacher was convicted in 1989 in the shooting death in Grand Forks a year earlier of 17-year-old Maynard Clauthier. Schumacher was initially convicted of manslaughter and reckless endangerment, but won a new trial and was eventually convicted instead of negligent homicide and sentenced to five years.

Separate court documents show that Schumacher was convicted of disorderly conduct in January 2013. He received a 30-day suspended jail sentence and served a year of probation.

The violence shook Fargo, which is North Dakota's largest city but has a low crime rate. The only other Fargo police officer killed in the line of duty was Frederick Alderman, who was shot to death July 5, 1882, according to the Officer Down Memorial Page, a national non-profit group that keeps records of fallen officers.

Late Thursday, about 200 people gathered for a candlelight vigil in Moszer's honour, KFGO-AM reported.

Moorhead Police Officer Nicole Reno said Moszer "made jokes when he needed to get through the day and was just really a great officer," the station reported.

Todd said earlier that Schumacher had exchanged gunfire with a SWAT officer. He said a squad car at the scene was fired on and he believed Schumacher was targeting police. A SWAT team in an armoured vehicle retrieved Moszer and took him to a hospital.

Police said officers were initially sent to the scene after Schumacher's son called dispatchers and said Schumacher had fired a gun at his mother, Schumacher's wife. The caller and his mother escaped the home unharmed.

Police said they tried to communicate with Schumacher through negotiators, but that he didn't respond and the SWAT team eventually entered the house and found the body.

Sarah Stensland, 26, lives less than a block from the suspect's home. She said she and her girlfriend locked the doors, turned off the lights and hunkered down in the basement for the night.

"We were scared. We could hear gunshots very clearly, even from the basement," she said. "I felt like my nerves were on edge all night. I'm just exhausted."