OGDEN — The man shot and killed by Ogden police on Friday as he was allegedly stabbing a woman repeatedly had a record of stalking over the past year.

On Saturday, Ogden police identified the man killed by an Ogden officer as Justin Patrick Moses, 35, of Ogden.

Moses was shot after officers responding to a domestic violence report allegedly found him stabbing a woman repeatedly in front of a home at 437 N. 630 East in Ogden. Officers "made some commands," but Moses didn't comply, according to Ogden Police Lt. Danielle Croyle.

"The officer just took the necessary actions to defuse the situation," Croyle said.

Moses died at the scene.

The woman, who lived with Moses at the home, was taken to McKay-Dee Hospital in critical condition and underwent surgery Friday. She was still in critical condition Saturday, according to a Facebook post by Ogden police.

The officer who shot Moses was placed on administrative leave, per department policy. That officer has been with the department since early 2013.

The name of the woman who was stabbed was not released Saturday.

According to court records, a woman applied for a protective order against Moses on June 4, 2015, but was denied. The same woman filed for a civil stalking injunction against Moses a month later. Moses was charged with nine counts of stalking in September of 2015, eventually pleading guilty to three of the counts as part of a plea deal. He was sentenced to 90 days in jail, placed on probation, ordered to undergo mental health treatment, and a permanent stalking injunction was issued.

Ogden police did not believe the woman involved in the stalking case was the same that was stabbed Friday.

During that same time period, in July of 2015, Moses was charged with trespassing and criminal mischief after he went into a Salt Lake County home. Charging documents state the homeowner was instructed by 911 to leave the house because Moses was listed as "being armed and mentally unstable." After he was arrested, Moses told officers he went to the house with the ghost of his ex-fiance who ran off after he kicked in the door, the charges state. Moses was convicted of misdemeanor trespassing.

On Feb. 4, a warrant was issued for Moses' arrest out of Tooele County Justice Court where he was charged with lewdness.

Court records state a former wife of Moses also filed for a protective order against him in 2011.

The Utah State Medical Examiner's Office, as well as the Weber County Homicide Task Force, were involved in the investigation of Friday's shooting. Police said the woman's daughter and the daughter's friend witnessed the stabbing, and investigators planned to question them about the incident.

Email: mjacobsen@deseretnews.com

Twitter: MorganEJacobsen