A man who in the past had reportedly threatened staff and participants at Pathways to Housing PA, a North Philadelphia nonprofit that provides services for people experiencing homelessness, has been charged with murder in the shooting death of a security guard at the office building where Pathways is headquartered.

When officers arrived at Logan Plaza on the 5200 block of Old York Road around 11:30 Friday morning, they found security guard Nassir Day, 25, unconscious on the lobby floor from a gunshot wound, police said Saturday.

Security personnel told police the gunman was on the third floor, where Pathway’s administrative offices are and where gunshots could be heard.

There police said they encountered Wayne John Dorylis, 59, who was holding a large knife. He eventually followed officers’ commands to drop the weapon and was taken into custody. Police said they recovered three “spring shot-style” homemade guns.

Dorylis, whose last known address was in Milford, Del., was first taken to Einstein Medical Center for treatment of arm abrasions and then to the Police Department’s Homicide Unit.

Dorylis has been charged with murder, weapons offenses, causing a catastrophe, and recklessly endangering another person, and is being held without bail pending a preliminary hearing scheduled for Oct. 18, according to court records.

A spokesperson for Pathways declined to comment on the shooting, referring a reporter to a statement posted on the organization’s Facebook page Friday.

“An individual, who had previously made threats against our staff and participants and served time as a result, has been apprehended,” the statement said. “This individual had not been in contact with Pathways in more than 18 months prior to today, and was never a participant in any of our programming. We are both grateful that our staff and participants are safe, and full of grief to learn that a victim of today’s shooting has passed away. Our hearts go out to the victim’s family.”

A GoFundMe campaign established Saturday afternoon seeks to raise $10,000 for Day’s girlfriend and their unborn first child. Day “loved his job and the people he was tasked with protecting,” it says, crediting him with delaying Dorylis from getting upstairs long enough for Pathways employees and others to seek cover.

Court records indicate Dorylis was charged with making terroristic threats in January 2020. Details were not available Saturday.

Valerie Johnson, vice president of advancement at Pathways, described Day as “a really great guy, super helpful and kind.”

Pathways said its office hours “will be limited for the near future as we begin to heal.” The agency currently supports 550 people in regular apartments and has furnished more than 1,000 homes through the Philadelphia Furniture Bank for individuals and families who are leaving homelessness or foster care, are victims of domestic abuse or natural disasters, or are veterans, refugees, or immigrants.