ROCHESTER, N.Y. (WROC) — A convicted felon from Schenectady pleaded guilty on Thursday to firearm charges after discharging a gun during separate incidents in Rochester.

Alejandro Rivera, 36, traveled from Schenectady to Rochester on a train in April last year. Police say while exiting the station, he pulled out a 9mm pistol and fired it — allegedly by accident, which caused multiple people to run for cover.

Rivera then fired another round before making his way to the House of Mercy parking lot. Rivera got into an argument and, as security approached him, he fired the gun again.

As police were heading to the scene, Rivera fled on foot but was arrested a week later near the same Amtrak station.

The Rochester Police Department conducted a search at the home of Rivera’s mother on Joseph Avenue and recovered the pistol. Investigators say that Rivera had four prior felony convictions and was prohibited from owning a firearm.

If convicted, he faces a maximum penalty of 10 years in prison and a $250,000 fine. Rivera is set to be sentenced on January 6, 2023.