An off-duty Miami cop is recovering after being stabbed in the face by a patron at Magic City Casino.

Miami Fraternal Order of Police President Javier Ortiz said via email that the officer also discharged his gun to protect himself and the public early Thursday.

The Miami Herald reported witnesses told investigators the customer had been in the poker room and became aggressive after being asked to leave. Employees asked the off-duty officer to escort the man out.

“Once he went to confront the man, the guy threw money in his face,” Miami detective and spokeswoman Frederica Burden told the Herald.

The man then stabbed the officer with an unknown instrument, leading the officer to fire his gun, hitting the man, cops said.

The officer was taken to Jackson Memorial Hospital for treatment and was later released. The other man was in surgery Thursday morning.

The Associated Press contributed to this report.