A gun accidentally went off inside a Salt Lake apartment when a man was pistol whipped during a fight Thursday evening.

Around 8:30 p.m., two men began arguing at an apartment near 15 S. 300 East, the Salt Lake Police Department said. A fight broke out and one man pistol whipped the other.

The gun fired one shot into the ceiling, police said. No one was hit.

A man was taken to a nearby hospital and treated for a cut on his head. A 25-year-old man was booked into the Salt Lake County Jail for investigation of aggravated assault.