A 24-year-old police officer and a suspect died after a shootout Saturday afternoon.

Officer Tyler Stewart, 24, died at Flagstaff Medical Center after he was shot by a suspect in a domestic-violence case, Flagstaff police said.

Stewart was looking for the suspect about 1:30 p.m. in the 800 block of West Clay Street when a man identified as Robert W. Smith, 28, of Prescott, fired several shots at the officer, police said. The suspect then shot himself dead, police added.

Stewart was taken to Flagstaff Medical Center in critical condition and then later died, police said.

Stewart had worked at the department for less than a year, police said. He was a graduate of Boulder Creek High School in Anthem, Arizona, and Concordia College in California.

"This is an enormous tragedy for our department and the family of our Officer. We are a very close knit organization, and know that all members of the Flagstaff Police Department are grieving at this time. With that being said, all of the men and women of the Flagstaff Police Department extend our prayers and condolences to the family of our Officer Tyler Stewart." Chief Kevin Treadway said in a statement.

"It is heartbreaking to lose one of our officers," Mayor Jerry Nabours said. "We collectively mourn for his family and the entire department."