SANDY, Utah (ABC4 News) — After a workout at 24 Hour Fitness late Saturday night, Dan Hill found himself locked inside.

Confused as to how he could get locked in a 24-hour gym, Hill told ABC4 News he didn’t want to open the door because he knew the security alarms would sound and the cops might think he broke in.

Calling friends and family about what to do, Hill said some told him just to walk out, others said to call 9-1-1 and his wife told him to “find a comfortable place to sleep.”

“So, I called dispatch and the guy pauses for like 10 seconds and says ‘You’re where?’” Hill said. “And I said, ‘I’m in 24 Hour Fitness, and there’s an alarm system here and I don’t want to get busted for breaking and entering.’”

In the meantime, he posted on Facebook saying, “I am literally locked inside 24 Hour Fitness right now. They closed the doors and went home while I was swimming my laps in the pool. Doesn’t the name suggest that they stay open 24 hours?”

“I just thought it was kinda funny at the start. You know, it was kinda like Home Alone,” Hill said. “Like oh my gosh. I have this gym to myself.”

Spending more than an hour inside what Hill thought was a 24-hour gym, he posted another photo on Facebook with the caption, “Free at last! Free at last! Thanks to three nice cops I am free at last.”

With more than 11,000 likes and nearly 5,000 shares and counting, Hill said he didn’t know his experience would go viral. But said it’s a funny memory he won’t forget any time soon.

And as for the gym, a manager at the Sandy location showed ABC4 News a sign on the door that says it’s open Monday to Sunday from 4 a.m. to midnight.

The manager said the company changed their hours December 2, at specific locations across the country.

In a statement to ABC4 News from 24 Hour Fitness it says:

On behalf of 24 Hour Fitness, we apologize to Mr. Hill and the unfortunate experience he had in the 24 Hour Fitness Sandy club, 10365 South 1300 East,  when it closed Saturday evening.  We made the decision recently to close select clubs in the overnight hours of 12:00 to 4:00 a.m. based upon low usage, among other factors.  In doing so, we have been helping members locate to nearby clubs that are open during the overnight hours. We clearly did not do a good job of our closing procedures for this club on Saturday night and will reinforce our club procedures so that this incident doesn’t occur in the future.  We continue to be committed to providing our members and guests with the best possible fitness experience at a great value.