A South Dakota police officer killed in the line of duty on Tuesday grew up in Michigan and was the son of a law enforcement official, according to reports.

Rapid City police officer James Ryan McCandless was the son of retired Midland County Undersheriff James McCandless, according to The Associated Press.

James McCandless was fatally wounded during a routine traffic stop that turned into a deadly shootout late Tuesday afternoon.

The 28-year-old's death is the first city officer killed in the line of duty since 1916, according to a report in the Rapid City Journal. Two other police officers and the gunman, believed to be in his 20s, were also wounded in the shooting.

"These officers are heroes," Rapid City police Chief Steven Allender said in a news conference on Tuesday. "I'd ask you and the rest of the community to honor them."

Allender said around 4:30 p.m., the three officers saw four people behaving suspiciously at the intersection of Anamosa and Greenbriar streets in North Rapid.

The officers were talking to the group for a few minutes when one of the men pulled out a gun and fired multiple shots at the officers. At least one of the officers returned fire injuring the suspect, Allender said. The officers were wearing protective vests.

"Unfortunately, they only cover the upper torso, so they're not foolproof," Allender said of protective vests.

The younger McCandless gave six years to the Rapid City police force.

CNN said the deceased officer recently got engaged and had just bought a home and was starting a farm.