A 44-year-old Egyptian immigrant tried 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 Monday night when the masked gunman entered the rear of the store shortly after 11 p.m. and demanded money, police said yesterday.

Police said the gunman, identified as Cordell Adams, 23, lives on the same block as 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. The others at the store at the time got the handgun - a silver .380-caliber semiautomatic - and subdued Adams until officers arrived, police said.

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

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

A friend of the victim's, Mohammed Moukaouim, came by the house yesterday 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.

Yesterday morning, the neighborhood around the pizzeria 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 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.