A 44-year-old Egyptian immigrant died trying to fend off an armed robber who knew him by name, but was shot to death in front of relatives who then wrestled the gunman to the ground.

Aly E. Elkaied, co-owner of Carnival Pizza at 3062 N. 23d St. in North Philadelphia, was closing up last night when the masked gunman entered the rear of the store shortly after 11 and demanded money, police said today.

Police said the gunman, Cordell Adams, 23, lives on the same block of the pizza shop and was known to employees. When the gunman announced the robbery, he looked at Elkaied and said: "Aly, give me the money," said homicide Capt. James Clark.

Elkaied, a father of four, and the gunman got into a struggle, prompting other employees and family members to intervene, said Officer Tanya Little of the Public Affairs Unit. They got the handgun - a silver .380-caliber semi-automatic - and subdued Adams until police arrived.

Elkaied, who lived in the 2100 block of Unruh Avenue in the city's Oxford Circle neighborhood, was shot three times and rushed to Temple University Hospital. He was pronounced dead at 11:37 p.m., Little said.

Adams was treated at Temple for minor injuries sustained during the scuffle and released. He is charged with murder.

A friend of the victim, Mohammed Moukaouim, came by the house this afternoon to offer condolences. He said Elkaied was "a very nice man. He didn't have any enemies. He's a real Muslim: He believed in peace, and he worked hard to support his family."

Another friend, Said Abbassi of New Jersey, said Elkaied had been in this country for 17 years.

This morning, the neighborhood was quiet as residents expressed shock. Several residents, who did not want to be identified, said Elkaied was a well-respected businessman. They said the neighborhood is relatively safe during the day.

Adams is a convicted drug dealer who is on probation and has two pending drug-dealing cases, according to court records. He is scheduled for trial next month in one of the active cases.

Contact staff writer Robert Moran at 215-854-5983 or bmoran@phillynews.com.

Inquirer staff writer Vernon Clark contributed to this article.