LIEPAJA, Latvia — On a spring morning, guards bark orders across the grounds of Karosta Prison in the sleet at a group of young new arrivals.

The group's march through the gates of the decrepit brick building on the western coast of Latvia is deemed unsatisfactory, and the members are told to do it again — this time on their knees, with their hands on their heads. They march too slowly this time, so they are then ordered to sprint around the site's perimeter one after the other.

This was a scene fairly regularly played out throughout the 20th century, when the military prison was initially run by the Russian empire, then the newly formed Latvian government, then the Soviet army, then the Nazis, then the Soviets again, and finally the Latvian army after the country regained its independence in 1991.

But what's unusual is that members of this group are paying for this treatment, and will be subjected to a range of similar punishments over the course of the next two hours.

The group of teenagers from neighboring Lithuania are taking part in one of the immersive experiences the prison now offers tourists, billed as a "historical interactive reality show involving the audience."

Participants in a session at the former military prison. Ints Kalnins / Reuters file

Guests can also spend a night in an unrenovated cell — for only $17.

For those feeling more adventurous, an "Extreme Overnight" package is available. "You will be able to step into the shoes of a prisoner on a dark and dismal night," the attraction vows. Guests are woken up during the night and forced to carry out tasks such as situps, or just be shouted at for a while.

The deeply unrelaxing way to spend a vacation known as dark tourism has been turbocharged by the rise of social media platforms, which allow tourists to document every macabre moment.

Karosta is now drawing people from around the globe for an ever-expanding menu of activities that includes escape rooms, paintball and a café.

“People have seen the museums, they have seen the castles, now they want to see something else,” says Einars Meiris, who was dressed in a Soviet-era military uniform as he stalked the prison's corridors to make sure the young Lithuanian inmates behaved.

A guide takes a picture of a visitor in Karosta. Ints Kalnins / Reuters file

In between supervising interrogations and visits to the site's hospital — which features a very stern nurse in a World War II-era costume — Meiris outlines what draws people to Karosta.

"Some people come to reminisce, you hear them saying, 'Ah, the good old Soviet Union,'" Meiris says. "The students, they’re coming here for some action ... they want thrills. The 40- to 50-year-olds, they want to remember what their youth was like for those who served in the Soviet army. In their minds, it's not about what's good or bad, it was their youth, it's the best time in their lives. You see them walking around with their big bellies and putting on the gas masks like the old days."

Many Americans, Canadians, Britons and Australians "want to know what it was like on the other side" of the Iron Curtain, he added.

However, some people leave before the end of their session "because they feel they have heard enough," according to Meiris.

A corridor in the former military prison. Ints Kalnins / Reuters file

While the Karosta experience might raise eyebrows with some, experts say it is part of a wider trend.

John Lennon, a professor at Glasgow Caledonian University, argues it is often the passing of time that determines when dark tourism transitions into something more palatable.

"Medieval torture museums are seen as funny, a museum about torture during the Iraq War wouldn't even be allowed to open," he said. "The Jack the Ripper tour is fine in London but a tour about a murder or set of murders within the last few years would be seen as distasteful."

He believes sites such as Karaosta actually perform valuable functions. “They have an importance as many of these sites are historical legacy sites and are evidential," he added. "You can't deny the Holocaust, you can't deny atrocities committed by the Soviets if you have a historical record."

Lennon added: "There has always been an attraction to the darker side of human nature, a fascination with our ability to commit acts of evil. Evil seems to unify all these sites — we are looking at the very worst we have done."

A general view of the former military prison in Karaosta in Liepaja, Latvia. Ints Kalnins / Reuters file

What surprises Lennon is not so much the fact that people choose to go to Karosta, but the manner in which they document their experiences.

"It's the amount of image recording I'm thrown by, and the filmic recording that's posted on various digital channels," he said. "The very worst we do is recorded next to the most banal, you have photos of people visiting Auschwitz next to them opening Christmas presents."

Limits have been set at Karosta.

"There was initially a Nazi uniform as part of the tour, but the issue proved too sensitive," Meiris said.

The student participants sat in silence while consuming tea and cookies after being locked away in solitary confinement in complete darkness to round out their Karosta experience.

"It's definitely reminded me to be a good boy, that's for sure, but also to remember how things were," Ignas Balchunas, 13, said. "I wouldn’t want to come back here ever."