DETROIT -- U.S. Secretary of Homeland Security Janet Napolitano vowed Wednesday to seek "swift justice" for bandits who engaged border patrol agents in a gun battle that killed Michigan native Brian Terry.

Napolitano, the top government official attending services for Terry at Greater Grace Temple in Detroit, described him as an exceptional agent who cared deeply about those serving with him.

"He put service before self, which is the mark of heroism," Napolitano told Terry's loved ones and dozens of law enforcement officers from agencies across the country and neighboring Canada.

The 40-year-old agent was shot to death while tracking an organized gang Dec. 14 in an Arizona canyon just north of Mexico. Four bandits were arrested. Others are being sought.

Napolitano had said shortly after Terry's death that the bandits tracked by his team typically rob drug smugglers or illegal immigrants making their way into the U.S.

"We resolve ... I resolve to pursue swift justice for those responsible for his death," Napolitano said.

Terry joined the Marines after graduating from Flat Rock High School in 1988. He followed his three-year military career with stints with police departments in Ecorse and Lincoln Park, outside Detroit.

Terry, a member of the elite Border Patrol Tactical Unit -- BORTAC -- once wrote that he didn't fear death because he had "been close enough to it on enough occasions."

His fear was the loss of honor, Michigan State Police Sgt. Dan Bowman read from notes Terry had written about himself.

Terry had written that he would "rather die fighting than to have it said that I was without courage."

The Justice Department, FBI and Mexican authorities are working together to weed out the remaining suspects from the attack, said Alan Bersin, U.S. Customs and Border Protection commissioner.

"The people who murdered him will be brought to justice. Make no mistake about that," Bersin said during Wednesday's services. "They can run, but they cannot hide."

Terry is survived by his mother, father, a brother and two sisters.