A veteran Indiana police officer was fatally shot in an exchange of gunrfire with a homicide suspect who later died from injuries suffered during the shootout, authorities said.

The Terre Haute Police Department announced the death of Patrolman Rob Pitts Saturday. He had been a member of the department for 16 years.

“Rob is deeply missed, but we are grateful for the time we had with him," Terre Haute police spokesman Ryan Adamson said Saturday. “Thank you for your continued prayers.”

“It is another tragic loss for the Wabash Valley and the Terre Haute Police Department." — Sgt. Joe Watts, Indiana State Police

The suspect opened fire Friday from the second floor of a Terre Haute apartment building after he was approached by four investigators, police said in a news release. The suspect had been linked to a homicide earlier Friday.

After being shot, Pitts was taken to Terre Haute Regional Hospital, where he died, police said.

“It is another tragic loss for the Wabash Valley and the Terre Haute Police Department," Sgt. Joe Watts of the Indiana State Police said.

Terre Haute Police Chief John Plasse said the suspect barricaded himself inside the building and was shot and killed in the standoff with officers from the city and other agencies.

Pitts is the first Terre Haute officer to die in the line of duty since July 11, 2011. Officer Brent D. Long was serving an arrest warrant with a U.S. Marshal's Fugitive Task Force when he was killed.

The Associated Press contributed to this story.