PHOENIX -- Charlie Keating IV was famous for his family but made a name for himself as a star distance runner at his Phoenix high school and then as a Navy SEAL.

He was shot and killed Tuesday in Iraq during a gunbattle that involved more than 100 Islamic State fighters, Army Col. Steve Warren said. The Navy Petty Officer 1st Class was part of a quick reaction force that moved in to help American military advisers who came under attack.

He's the third American serviceman to die in combat in Iraq since the U.S.-led coalition launched its campaign against the Islamic State group in summer 2014, military officials said.

"Like so many brave Americans who came before him, Charlie sacrificed his life in honourable service to our nation for a cause greater than self-interest, which we can never truly repay," U.S. Sen. John McCain, R-Ariz., said in a statement.

Before he attended the Naval Academy, Keating was known as the grandson of an Arizona financier involved in the 1980s savings and loan scandal. Charles H. Keating Jr., who died in 2014 at age 90, served prison time for his role in the costliest savings and loan failure of the 1980s.

The scandal also shook the political world. Five senators who received campaign donations from Charles Keating Jr. were accused of impropriety for appealing to regulators on Keating's behalf in 1987. Those senators were McCain, Democrat Alan Cranston of California, Democrat John Glenn of Ohio, Democrat Donald W. Riegel Jr. of Michigan and Democrat Dennis DeConcini of Arizona.

The elder Keating went to prison when Charlie was a small child and other children reportedly made fun of him.

"What happened in the past, I really don't care. I'm really close to him," the younger Keating told The Arizona Republic in 2004 when he ran in the Class 4A state track and field championships in suburban Phoenix.

His grandfather watched him compete for the first time.

A 2004 graduate of Phoenix's Arcadia High School, Charlie Keating was city and regional champion in the 1,600-meter run as a sophomore, junior and senior.

Rob Reniewicki, Keating's former high school track coach, said he had kept in touch with Keating through Facebook over the years. He said Keating was planning to get married in November.

"He was a tremendous athlete, a tremendous person. I'm devastated. I'm crushed. I'm trying to hold myself together," Reniewicki told Phoenix TV station KTVK.

Keating ran track and cross country from 2004-06 at Indiana University, where his father was a three-time All-America swimmer from 1974-77 and finished fifth in the breaststroke at the 1976 Olympics.

Keating was a member of the 2004-05 Hoosiers team that was Big Ten Conference runner-up in both the indoor and outdoor seasons. He competed in the mile run.

"When Charlie left IU to enlist and try to become a SEAL, I don't think it really surprised any of us," said Robert Chapman, professor of kinesiology at IU Bloomington, who served as Indiana men's cross country coach from 1998-2007.

"You could tell he was a guy who wanted to be the best and find out what he was made of, and serving as special operations forces for his country embodied that," Chapman said.

Arizona Gov. Doug Ducey ordered all state flags lowered to half-staff from sunrise to sunset Wednesday in honour of Keating, who also was the cousin of former Olympic swimming champion Gary Hall Jr.