FARGO, N.D. — The first police officer to be killed in the line of duty for more than 50 years in one North Dakota city was shot multiple times by a man with a criminal history that includes interfering with police and harassing public officials, authorities said Thursday.

Officer Cody Holte, a three-year veteran of the Grand Forks Police Department, died at a hospital Wednesday after coming to the aid of two deputies trying to serve eviction papers, police said. Holte, 29, and Cpl. Patrick Torok were first on the scene after Salamah Pendleton opened fire on the deputies at an apartment in the city close to the Minnesota state line.

"If I had to pick a word ... a true servant," Grand Forks Police Chief Mark Nelson said, fighting back tears. "He made everyone around him better."

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

One of the two sheriff's deputies, Cpl. Ron Nord, was shot in the leg and abdomen and is listed in stable condition. He and Sgt. Kelly McLean were fulfilling a judge's order to remove Pendleton and Lola Moore, 61, from the premises. Moore died from gunfire but police would not give specifics on her death.

Grand Forks prosecutors said they are working on charges against Pendleton, 41, who was also shot several times and remains hospitalized.

According to police, the deputies received no answer when they knocked at the door of the apartment about 2:30 p.m. Wednesday. Once they entered the unit, Pendleton retreated to a bedroom and ignored commands to come out. Deputies then opened the door and Pendleton started shooting, at which time the officers retreated and radioed for help. Holte and Torok "responded immediately," police said in a report.

Grand Forks County Sheriff Andy Schneider said serving civil orders is probably the most dangerous job for law enforcement. He added that Pendleton and Moore had been given an extra two days to vacate the premises but did not comply.

Nelson declined to give further details because the case remains under investigation.

Pendleton has been charged with dozens of offenses in the last 20 years, mostly misdemeanors and the majority of them while he lived in Iowa. He has been arrested numerous times for driving under suspension and driving without insurance, including last year Grand Forks.

On Wednesday night, about 50 first responders formed a procession through the city with emergency lights activated to honor Holte, and the Grand Forks Police Department was lit up blue. Hundreds of people gathered for a candlelight vigil in the parking lot of Altru Hospital in Grand Forks where Nord was being treated.

Holte is survived by his wife and infant son, Nelson said.

"There's a hole in my heart that can never be plugged," Nelson said Wednesday night at a news conference. "These people wear a badge, these people protect your community, these people ask for nothing in return other than an honest salary. Remember, it is not how this officer died, it is how this officer lived that made him a true hero."

Gov. Doug Burgum said the U.S. and state flags will be flown at half-staff from dawn to dusk on the day of the fallen officer's burial.