A Utah man really started to sweat Saturday night when he realized he’d been locked inside a 24 Hour Fitness.

Dan Hill wrote on Facebook that the staff in Sandy, Utah, had locked up the gym while he was in the pool swimming laps.

AMERICAN TRAVELER IN TEL AVIV GETS STUCK IN CARGO HOLD OF MOVING BUS, SHARES PLIGHT IN INSTAGRAM STORY

"I am literally locked inside 24-hour fitness right now,” he wrote along with pictures of an empty gym. “Doesn't the name suggests that they stay open 24 hours?”

Afraid he could set off an alarm by opening the door, Hill called police.

While he was waiting, he wrote he called his wife who 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?'” he told KTVX-TV in Salt Lake City.

Hill jokingly compared his experience to the movie “Home Alone.”

“Like oh my gosh. I have this gym to myself,” he said.

After more than an hour locked inside, Hill posted on Facebook: “Free at last! Free at last! Thanks to three nice cops I am free at last.”

“We apologize to Mr. Hill and the unfortunate experience he had in the 24 Hour Fitness Sandy club,” 24 Hour Fitness said in a statement, according to the station.

They said they've decided to close some of their locations between midnight and 4 a.m. based on “low usage" among other factors.

CLICK HERE TO GET THE FOX NEWS APP

“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,” the company added, according to KTVX.