About 20 of Knox's fellow officers from the First Police District formed two columns outside the church, where they fought back tears and comforted each other. Across from them on Buist Avenue, more than 600 officers from seven states stood at attention, their ranks stretching an entire city block.
"He was born in the uniform," said Sgt. William Butts, Knox's supervisor, as he stood outside the church. "He loved the job. . . . It was like losing a relative, a brother. It hurt us real bad."
A long parade of family and friends filed into the church, clutching soggy tissues and the arms of loved ones. Inside they prayed for Knox, remembering him as friend and father, husband, son and cop.
"He always wanted to be a servant of the people," Msgr. James Howard told the mourners.
"We need people like that, of strength and courage and determination, who don't think, 'What's going to happen to me?' but think, 'I'm going to do my job.' "
Mayor Rendell attended with other dignitaries, including Police Commissioner Richard Neal and Deputy Commissioners Thomas Seamon and Thomas Nestel. Fire Commissioner Harold Hairston attended, as did John Shaw, president of the Fraternal Order of Police.
"It's an extreme loss," Neal said. "It really brings it home how tragic a situation it is."
Before Sunday, the last officer killed on duty was Daniel Boyle. Boyle - one day shy of finishing his first year on duty - was shot in February 1991 while investigating an auto theft in North Philadelphia.
Knox and Officer Anthony Howard Jr., 29, were shot inside the Roy Rogers restaurant on Broad Street near Snyder Avenue when they answered an 8:29 p.m. call for a holdup in progress. Knox was hit in the back and head.
Howard, wounded in the arm and chest, was in fair and stable condition yesterday at Thomas Jefferson University Hospital.
Police have undertaken a massive search for Knox's killers. Neal said yesterday that police were continuing to evaluate and investigate tips.
Meanwhile, homicide investigators confirmed they had recovered a prime piece of evidence from the restaurant: a yellow baseball cap with a bent brim, believed to have been worn by one of the gunmen.
Detectives have sent the hat to the FBI laboratory in Washington for DNA testing. It could link a suspect to the crime, particularly if hair or scalp particles are in the hat, detectives said. No two people except identical twins have the same DNA.
Detectives also have other evidence. Eyewitnesses are believed to be able to identify the gunmen, and a number of fingerprints were retrieved from the restaurant. Technicians continue to try to link them to names.
Still, that progress was small comfort to family and friends who gathered for the funeral.
"I'm just in shock and really sad," said Margaret Dietzmann, Knox's cousin.
"I just can't believe it. He was so happy to be a police officer."