A Hell’s Kitchen man was attacked, threatened and robbed by a stranger whom he unknowingly buzzed into his building, police said.

The 30-year-old was inside his apartment on 49th Street near Ninth Avenue around 7 a.m. Thursday when someone unexpectedly buzzed up to his apartment, cops said later that day.

The man let the person in and heard a knock at his apartment door minutes later.

He opened the door and saw the stranger standing in the doorway and asking him for money, cops said.

When the victim declined, the suspect punched him in the nose and grabbed his iPhone X.

“If you tell the police, I will hurt you,” he said, before fleeing, according to authorities.

The victim was treated at the scene for a cut on his nose, cops said.

Police provided a video of his attacker, who is still on the loose.