For Martinez, who had no prior convictions, the events that began Dec. 10, 2010, earned him a criminal record most people take years acquire.
That night, Martinez and friends left the Black Pumpkin club at Whitaker and Wyoming Avenues and began street racing another group until police stopped Martinez.
Martinez bolted and Officer Kevin Gorman chased him to a chain-link fence on Hope Street above Westmoreland in Kensington.
As Martinez perched atop the fence, he turned and fired at Gorman with a .45-caliber pistol police said he stole from a Black Pumpkin security guard. Gorman was wounded in the shoulder and Martinez escaped.
His next encounter with police was Dec. 22, when a tip led a police SWAT unit to a house in the 800 block of Sanger Street in Summerdale.
As officers went through the converted basement, Martinez opened fire. One shot hit Sgt. Christopher Binns in the temple but deflected off his helmet. A second shot went through wallboard and hit Officer Francis Whalen in the chest but was stopped by his armored vest.
The SWAT unit retreated and began a 21/2 hour standoff that ended when Martinez accidentally shot himself.
"But for the grace of God, that day could have been one of the bloodiest days in the history of the Philadelphia Police Department," Assistant District Attorney Brian Zarallo said.
Nine months later, police charged Martinez with killing Carlos Fernandez, 38, in a home invasion on Dec. 21, 2010 - the night before the standoff.
The arrest followed the discovery of a photo of Martinez wearing a fancy watch and diamond-stud earrings stolen from Fernandez's body.