NEW YORK — Police have arrested a homeless man wanted for a murder in Brooklyn and several other shootings.

Joe Pentangelo, a spokesman with the Port Authority of New York and New Jersey, says Matthew Passaro was taken into custody by Port Authority police at the bus terminal in midtown Manhattan on Wednesday.

Pentangelo says the 46-year-old suspect was armed with a loaded Glock 45 caliber pistol and two additional loaded magazines. He says Passaro didn’t resist, but once he was cuffed he became irate and told the officers they were lucky he hadn’t shot them.

Passaro is a suspect in the fatal shooting and stabbing of a 47-year-old man in Brooklyn Heights on Sept. 20. He’s also tied to shootings in California and Las Vegas.

Information on Passaro’s lawyer wasn’t immediately available.