FARGO, N.D. -- A North Dakota man accused of fatally shooting a woman inside his home and initiating a firefight that killed a police officer was charged Friday with two counts of murder.

Authorities said Salamah Pendleton used a semi-automatic rifle in the shooting in Grand Forks on Wednesday that killed Officer Cody Holte and Lola Moore. If convicted of murder, Pendleton faces life in prison without parole.

Holte was one of two officers who came to the assistance of two sheriff's deputies who were serving eviction papers to Pendleton at his apartment in the city next to the Minnesota state line. Authorities have not said why Moore was in the apartment nor described her relationship to Pendleton.

A child was also in the apartment at the time of the shootings, prosecutors said, without providing details.

In addition to the two murder counts, Pendleton, 41, is charged with three counts of attempted murder, terrorizing, reckless endangerment and criminal mischief. Court documents do not list an attorney who can speak on his behalf.

One of the deputies, Cpl. Ron Nord, was shot in the leg and abdomen and was treated and released from a local hospital. Pendleton was also shot and wounded, according to the affidavit. Court records show he has been charged with dozens of offenses in the past 20 years.

The shootings happened Wednesday afternoon when deputies entered the thrid-floor apartment. Police said Pendleton retreated to a bedroom and ignored commands to come out. Deputies then opened the door and Pendleton started shooting. The officers retreated and radioed for help.

Holte and Cpl. Patrick Torok were first on the scene and were in the living room and dining room when Pendleton opened the door and shot Holte and Nord.

Holte, 29, suffered three gunshot wounds and was pronounced dead at a hospital, prosecutors said.

Investigators found about 41 shell casings in the apartment. In addition to the semi-automatic rifle, they recovered a .22 caliber rifle, several full and empty magazines and various boxes of ammunition.

Holte is the first officer to be killed in the line of duty in Grand Forks since 1966, according to the Officer Down Memorial Page website. It was the 33rd gunfire-related death of a North Dakota peace officer since the 1870s, the site shows.

Nord, wore his uniform shirt, gun and badge as he walked out of Altru Hospital Thursday, KFGO reported.

“I had to walk for Cody, because he still walks with us and he never got a chance to walk out alive," Nord said.

More From KROC-AM