The law firm representing the man who fatally choked a homeless man on the F train says their client acted “to protect” the other passengers.

Attorneys at Raiser and Kenniff of Manhattan said Daniel Penny “never intended” to hurt Jordan Neely, who died Monday after Penny was seen in a video putting Neely in a chokehold.

In a statement, the firm expressed their condolences to Neely’s family, but pointed to his “documented history of violent and erratic behavior.”

The city’s medical examiner on Thursday ruled the death of Neely, 30, a homicide.

Police sources say Penny, a former Marine, is part of an active investigation by the NYPD and the Manhattan district attorney’s office.

“Daniel never intended to harm Mr. Neely and could not have foreseen his untimely death. For too long, those suffering from mental illness have been treated with indifference. We hope that out of this awful tragedy will come a new commitment by our elected officials to address the mental health crisis on our streets and subways,” the firm said in a statement.

The Marine Corps said Penny, 24, served four years in the military from 2017 to 2021.