NEW YORK - An off-duty detective appeared to be justified in gunning down a razor blade-wielding attacker in the lobby of a Lower Manhattan condominium building, the New York Police Department said yesterday.

The officer was slashed on the neck before killing the man; the building receptionist required 23 stitches. A second suspect, who wielded a broken beer bottle, was wounded by gunfire.

The receptionist, Artemda Gjeli, had called the detective, Martin Carrano, to the lower Manhattan building on Wednesday night about telephone threats she'd received from an ex-boyfriend, police said.

Police are investigating whether the ex-boyfriend, who has addresses in both New Jersey and Minnesota, knew the attackers. Gjeli said the men didn't demand money.

Carrano and Gjeli were discussing the threats shortly before 10:30 p.m. when two men entered the lobby of the six-story residential building and asked if there were rooms for rent.

When Gjeli, of Lodi, N.J., told the men they weren't in a hotel, they jumped the detective and slashed him, police Commissioner Raymond Kelly said. The attackers then hurtled over the reception desk and began mauling Gjeli.

"She slid to the floor and attempted to fight her assailants as they continued to slash her with sharp objects," Kelly said.

Gjeli was slashed on her hands, knee, thigh and cheek.

The detective, a 20-year veteran, had a 3-inch slash at the base of his neck that required three staples. During the assault, he briefly fended off the attackers and ran through the lobby doors to clear his head when one of the suspects came toward him, police said.

Carrano fired 10 shots through the doors and hit both suspects twice, then told Gjeli to call 9-1-1. It wasn't clear whether he identified himself as an officer before firing.

Eugene Moralez, who was shot in the chest and foot, was pronounced dead at the scene. The second attacker, who has not been identified, was shot in the arm and abdomen and was in stable condition. Police were waiting to interview the suspect after he was lucid.

A preliminary investigation showed that the shooting appeared to be justified, said chief police spokesman Paul Browne. Carrano has not been involved in other police-involved shootings.

Investigators yesterday were searching for Gjeli's ex-boyfriend, who allegedly called the building before her shift began and harassed her co-workers. When she arrived at about 3 p.m. Wednesday, she also received calls from the man. During one call, he threatened her life and the life of her family, police said.

The ex-boyfriend has a lengthy rap sheet in New York and New Jersey for arrests such as witness assault and menacing; Gjeli was also once charged with witness tampering in New Jersey, police said.

The two had a seven-year relationship that ended in February, but no restraining orders were issued.

Gjeli filed a complaint against her ex-boyfriend in Carrano's Queens precinct on May 17 after she was slapped in a restaurant. Carrano, 43, was not the investigating officer on the case. It wasn't immediately clear why she chose to call him to report the harassing phone calls on Wednesday. *