Officer Robert Wilson III's son had a birthday coming up.
And so the eight-year member of the force, on duty Thursday in the 22d District, parked his patrol car outside a GameStop store on Lehigh Avenue. He'd pick up a gift there, and do a security check in the meantime.
Such checks are routine in the 22d District, where robberies are so common that business owners often keep logbooks to track officers' visits.
Wilson was at the counter when two brothers walked in and announced that they were robbing the place.
The younger of the two, Ramone Williams, would later tell detectives he hadn't seen Wilson or his partner outside, or their patrol car, before he and Carlton Hipps approached the counter with a pair of semiautomatic handguns.
Wilson drew his gun.
Commissioner Charles H. Ramsey on Friday said Wilson's final moments, in the midst of the gun battle, were captured in extraordinary clarity on the store's video. Police officials said they had never seen anything like it.
Homicide Capt. James Clark called Wilson a warrior, an "out-and-out hero," who fought his assailants until "the very, very end."
The brothers hid behind posters advertising video games as they opened fire at him. Officials said Wilson can be seen on the video wincing as he was hit by multiple bullets, but returning fire.
He never took cover, they said - instead drawing the gunfire away from the shoppers and store workers who huddled behind the counter.
And he fired back until a bullet struck him in the head.
As he fell to the ground, Hipps and Williams ran for the door. The encounter had taken just 30 seconds.
Officer Damien Stevenson, Wilson's partner, confronted them outside. Hipps took off and fired a shot at Stevenson, who returned fire and hit him in a leg.
Williams ran back into the store. He took off his sweatshirt, hid his gun, and tried to blend in among the terrified patrons. He was arrested, quickly, by officers arriving at the scene.
By Friday morning, police say, Williams had given a full confession to homicide detectives, who had worked the case long into the night. Hipps was cuffed to a hospital bed with Wilson's handcuffs.
Both men were charged with Wilson's murder.
"We're all in shock," Ramsey said Friday morning. "We're all going to suffer this loss for a very long period of time."
Hipps, 29, spent five years in prison for robbing a liquor store with an illegal gun in 2004, when he was 18. He was released from prison in 2009 and completed parole last September. He was still on probation when he was arrested Thursday.
Ramsey said Williams, 24, has a record for assault.
Williams had graduated from the Mathematics, Civics and Sciences Charter School, where he had some success as a basketball player and where administrators on Friday expressed shock at the news that he had been charged with killing a police officer.
"He would not be the student that I would have expected to end up like this," said the school's founder, Veronica Joyner, who described him as quiet, neat, and mature during his time there. "We did everything we could to have him pointed in the right direction."
The brothers were living together in a two-story brick rowhouse in Brewerytown, less than a mile from the store.
Williams told detectives the brothers bought the guns used in the robbery on the street. They had at least one more. Searching their home Thursday night, police found an AK-47, officials said.
At the house Friday, a woman, clearly distraught, told a reporter she was "in shock myself."
"I'm trying to wrap my head around it," she said, but declined to give her name or connection to the brothers.
At a news conference Friday, Ramsey and other police officials held back tears as they spoke of Wilson's dedication to his job and his willingness to volunteer for tough assignments. He had two children, ages 9 and 1, and was engaged.
Sgt. Eric Gripp, who worked with Wilson in the 22d District, remembered him as eager and affable.
"It can be a tough place to work, but it's rewarding," he said. "Bob made sure he never forgot that. He always came to work, and he kept everyone in the squad laughing."
Capt. Robert Glenn, Wilson's commanding officer, said Wilson frequently volunteered for assignments - including the department's body camera program, which is being tested in the 22d. He was not wearing his camera when he was killed, police said.
"If there was a crime pattern," Glenn said, "he would be the first to say, 'Let me and my partner be part of the solution.' "
Glenn said the district was reeling from Wilson's death. The last officer killed in Philadelphia - Moses Walker, in 2012 - also worked in the 22d.
Stevenson did not sleep all night, Ramsey said. The department will provide counseling for Wilson's colleagues, he said, and other officers will cover their shifts while they mourn.
Around the city, officials expressed shock and grief at the killing.
In a statement, Philadelphia Archbishop Charles J. Chaput called Wilson's death "senseless and devastating."
"I pray fervently that the Lord will pour his bountiful mercy on the soul of Officer Wilson and watch over the brave men and women who wake up each day ready to face innumerable and unimaginable dangers for the benefit of their fellow citizens," he said.
A coalition of antiviolence activists from across the city, including representatives from Enon Tabernacle Baptist Church and the Philadelphia Community of Leaders, issued a statement decrying the bloodshed.
"We send our heartfelt condolences out to Officer Wilson's family and call on all of Philadelphia to join us in ending violent acts against each other," they wrote. "We are too great of a people for us not to take action today to work to reduce violence."
Ramsey said simply that Wilson "redefined what a hero is all about."
On Monday, Wilson's son will turn 10.
The Fraternal Order of Police has set up a memorial fund to benefit the family of Philadelphia Police Officer Robert Wilson III, who was killed Thursday in the line of duty. Donations may be made at any branch of the Police and Fire Federal Credit Union. To locate a branch, call 215-931-0300 or go to https://www.pffcu.org.
On Sunday, St. Martin de Porres Roman Catholic Church will remember Wilson's life and service with special prayers during its 10 a.m. Mass. A special collection will be taken at that time to benefit his two sons. St. Martin, 2340 W. Lehigh Ave., is in the neighborhood where Wilson was fatally shot.