During two violent weeks in December, police say, it seemed as though Nasuil Martinez tried to kill every cop he came up against.

First, while fleeing a traffic stop with a stolen gun, the 20-year-old Kensington man shot a North Philadelphia patrol officer in the shoulder.

Then, 12 days later, he fired at five SWAT officers during a standoff in a dark Oxford Circle basement, hitting one officer square in his helmet and another in the middle of his Kevlar vest. He narrowly missed a third, police said.

Last month, while in custody, Martinez tried to slip a seven-inch prison-made shank into the Philadelphia courthouse where he stands accused of the attempted murder of six police officers.

Monday, police added another crime to Martinez's spree, charging him with the murder of a man they say he shot to death the night before his Dec. 22 standoff with police.

Martinez shot Carlos Fernandez, 38, twice in the chest in his home on the 3400 block of A Street, police said.

The men had argued over an unpaid drug debt, Homicide Lt. Philip Riehl said. Martinez killed the man in front of Fernandez's stepdaughter, and took the diamond earrings out of the dead man's ears and the watch off his wrist, Riehl said.

The next day, Martinez barricaded himself in an alcove of his girlfriend's basement, and again was taking aim at police.

"He's one of the most dangerous individuals Philadelphia law enforcement has ever encountered," Riehl said.

Martinez's shooting spree began early Dec. 10, said Assistant District Attorney Mark Gilson.

That day, Martinez and some acquaintances attended a court hearing for a man who pleaded guilty to killing a friend of the group.

To celebrate, the crowd went to the Black Pumpkin Club at Whitaker and Wyoming Avenues. At closing time, Martinez stole a .45-caliber semiautomatic pistol from the loosely hanging holster of a club security guard, Gilson said.

Shortly afterward, Officer Kevin Gorman, 33, and his partner, pulled over the group for speeding. Martinez, already wanted on two bench warrants, ran away. Gorman chased him to a chain-link fence on Hope Street.

Martinez waited atop the fence and fired at Gorman from just a few feet away, Gilson said.

"He appeared to want the officer to catch up so he could shoot him," Gilson said.

Gorman continued his pursuit even as he felt his own blood and the bullet, which passed through his shoulder, sloshing in his shirtsleeve. The four-year veteran is still recovering from his wound.

Early Dec. 22, police received a tip that Martinez was staying at his girlfriend's house on the 800 block of Sanger Street. The SWAT team went into the shadowy basement at 4:30 a.m.

"He was lying in wait," Gilson said. "He could see them, but they couldn't see him."

Sgt. Christopher Binns was hit in the temple of his tactical helmet. The bullet left a large dent. Officer Francis Whalen was saved by an armored plate in his vest.

Now exchanging fire, an officer shot Martinez in the shoulder, and the team regrouped at the top of the stairs.

Over the next two hours, Martinez recorded himself on a small camera, smoking cigarettes and taunting police about his ammunition stockpile, Gilson said.

The standoff ended when Martinez shot himself in the neck by accident, Gilson said. Police found him face down at the bottom of the stairwell, asking for help, according to Gilson.

"The police put their lives in danger one last time and saved his life," he said.

Homicide investigators matched ballistic evidence from the standoff to the bullets used to kill Fernandez, said Riehl, who worked the case with lead Detective Ken Rossiter.

When Martinez was arrested, he was wearing Fernandez's diamond cluster earrings and watch, investigators said.

In April, court sheriffs discovered the hidden shank in Martinez's shoulder brace as they prepared to transport him from the Curran-Fromhold Correctional Facility to the Criminal Justice Center for an unrelated case.

Martinez had broken off a piece of the brace for his wounded shoulder and sharpened it into a weapon.

"What was he going to do but use it on a sheriff to try and escape?" Riehl asked.

Since Martinez allegedly used the same weapon in all the shootings, the attempted murder charges will likely be rolled into one case with the new murder charge.

If convicted, he faces life imprisonment or even the death penalty.

Contact staff writer Mike Newall at 215-854-2759 or mnewall@phillynews.com.