Two brazen punks, one carrying a revolver, burst through the door of a Lawndale pizzeria last night, their sights set on the register and its contents.

They grabbed the shop's lone customer, who had just ordered a Stromboli, snatched the $20 bill out of his hand and put a gun to his head.

But the man at the end of the revolver's barrel was an off-duty detective and the confrontation ended with one suspect dead and the other the subject of a citywide manhunt by police.

Police said Friday the one armed robber's weapon was a blank gun loaded with blanks.

The chaos unfolded about 11:30 p.m., when an off-duty detective from Northwest Division walked into Rising Sun Pizza, on Rising Sun Avenue near Tyson, according to Chief Inspector Scott Small.

Minutes later, after the detective had placed his order, two men came into the store, one of whom had a gun, Small said.

The gunman, identified by police as Andrew Ellerbe, 33, grabbed the detective and ordered him to get on the floor. He complied, watching as the robbers turned their attention to the shop's 22-year-old owner and another employee, both of whom were working behind the counter.

Seeing his chance, the detective drew his Glock handgun and identified himself as a police officer, Small said.

Ellerbe turned and fired twice, mere feet from the officer.

He returned fire, striking the gunman at least once in the left side of his torso, Small said.

Both bandits fled empty handed, dropping the revolver on their way out the door.

But the Ellerbe, of Garnet Street near Dauphin in North Philly, didn't get far: He collapsed in the shop's adjacent parking lot, where medics pronounced him dead minutes later, police said.

The detective and the store's employees positively identified Ellerbe as the one who held them up, Small said.

The accomplice who fled into the night was described as a man in his 20s, who wore a dark hoody and jeans during the robbery attempt.

The ordeal, including the brief but violent shootout, was "all clearly recorded" on the store's surveillance system, Small said.

The video showed to muzzle flashes coming from the Ellerbe's gun, police said Friday. The weapon was loaded with blanks, two of which had been fired and four that had not.

Last night, the family of the store's owner huddled across the street from the scene, shivering in the light rain as they stared at the business' shattered windows.

The aunt of one of the employees, who wished to remain anonymous, characterized the pizzeria as a family-run eatery in a quiet neighborhood.

It's a popular place for police officers looking to grab a late-night meal, she added, noting that last night's incident was the first time it had been robbed.

The gunmen came in, she said, right as the employees were preparing to shut down for the night.

In the end, she was just thankful that the detective was there.

He'll be placed on administrative duty as Internal Affairs investigates the shooting, per police protocol.

Small said the officer showed courage in taking action.

Police are asking anyone with information on the second suspect's whereabouts to call 215-686-8477.

Police said Friday they had checked area hospitals and found no one had walked in during the night with any gunshot wounds.