A 32-year-old man is in police custody after witnesses said he waved a gun around outside of Winnipeg's Health Sciences Centre.

Police were called just after 12:30 p.m. Wednesday about a man armed with what appeared to be handgun near the hospital doors on William Avenue.

Officers who were already at the hospital for an unrelated matter responded and found the man. They arrested him without any incident but learned he had confronted a man he didn't know.

The confrontation escalated and the 32-year-old pulled out the gun and pointed it, police said, then tossed the firearm onto a low roof near an entryway.

The weapon was later recovered by police and found to be a homemade gun unable to actually shoot anything, police said.

The man is charged with possession of a weapon.

Nobody was hurt in the incident.