Police have arrested and charged a man wanted in connection with the slashing death of another man at a homeless shelter last week.

William Smith, 53, of Manhattan, was arrested on Monday night and is charged with second-degree murder, police said.

On Friday, April 15, police said Smith slashed the neck of a 56-year-old man at a homeless shelter on East 30th Street near First Avenue in Kips Bay. The victim was pronounced dead at the scene, police said.

Smith is also under investigation in a slashing and attempted robbery in Queens early Saturday morning, police said.

Smith allegedly tried to rob the driver after arriving at his destination on Van Cleef Street in Corona and slashed the man in the neck before running off without any money, police said.

While fleeing, police said Smith left his wallet and phone in the cab.

The cab driver was taken to Elmhurst Hospital Center in stable condition and is expected to recover, police said.

So far Smith has not been charged in that case, police said.