A man carrying a gun who got into a scuffle with police officers was arrested at a Bronx train station Friday, according to the city police department.

Officers said they stopped 26-year-old Trevale McCall around 6 p.m. after he jumped a turnstile at the 174th Street subway station near Crotona Park.

They found that he may have been a witness to a homicide in the Soundview section of The Bronx, according to the police report.

Police said when they tried to handcuff him, McCall resisted and a scuffle broke out.

The officers called for backup and were able to detain him.

Two officers were treated for minor injuries at a hospital.

Police said McCall was carrying a loaded 9-milimeter pistol — seen in the photo to the top-left — in a plastic bag.

McCall has been charged with several counts, including criminal possession of a weapon, theft of service, and resisting arrest.