A Utah man learned the hard way that just because his gym is called 24 Hour Fitness doesn’t mean that it is open at all hours.

Dan Hill of Sandy was working out when he found himself locked inside the gym, according to Fox 13. He called his family and friends and some told him to call 911. His wife said 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 told ABC4. “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.’ “

Hill posted photos on Facebook of himself at the completely empty gym, which quickly went viral.

“I am literally locked inside 24 hour fitness right now,” he wrote. “They closed the doors and went home while I was swimming my laps in the pool. Doesn’t the name suggests that they stay open 24 hours? Walking around trying to figure out how to get out.”

Hill didn’t know that the hours of the 24 Hour Fitness changed in December, according to ABC6.

“I just thought it was funny at the start. You know, it was kind of like ‘Home Alone,’ like ‘Oh my gosh, I have this gym to myself,’ ” Hill said.

Eventually, police arrived and let him out of the gym.

“Free at last! Free at last!,” Hill wrote in another Facebook post. “Thanks to three nice cops I am free at last.”