Get all the latest news on coronavirus and more delivered daily to your inbox. Sign up here.

Frustrated with city dwellers fleeing to the countryside who refuse to quarantine, one Indonesian politician has ordered that newcomers who don’t respect the rules be locked up in allegedly haunted houses.

Sragen regency head Kusdinar Untung Yuni Sukowati said her region saw an influx of people from Jakarta, Indonesia’s capital, and other major cities after lockdowns were issued there. Indonesian President Joko Widodo resisted a nationwide lockdown for the world’s fourth most populous country and instead lockdowns have been instituted in varying cities and regions.

Sukowati issued the unusual edict this week to scare rule-breakers, and so far five people have been locked in a “haunted house," according to a report.

"If there's an empty and haunted house in the village, put people in there and lock them up," Sukowati told AFP Tuesday when asked about the rule.

CLICK HERE FOR FULL CORONAVIRUS COVERAGE

Sukowati tapped widespread beliefs in the supernatural, which are a major part of Indonesian folklore. She instructed communities on the densely populated island of Java to repurpose the houses feared to be haunted to accommodate anyone new to the region found not to be in self-quarantine for 14 days.

In Sepat village, officials outfitted a long-abandoned house with beds distanced throughout the house and separated by curtains. So far, three residents have been locked up there to spend the remainder of their 14-day quarantine.

Heri Susanto, one temporary resident of the house, said he hasn’t encountered any ghosts so far.

CORONAVIRUS PATROLS IN INDONESIA USE 'GHOSTS' TO ENFORCE SOCIAL DISTANCING

"But whatever happens, happens," said Susanto, who came from the neighboring island of Sumatra. "I know this is for everyone's safety. Lesson learned."

Another village used the supernatural to spook its residents into social distancing last week, when a roving gang of “ghosts," known as pocong, took to the streets on patrol at night in Kepuh. The “ghosts” -- a village youth that who partnered with police -- wrapped themselves in white shrouds with powdered faces and kohl-rimmed eyes and represent the trapped souls of the dead.

“Since the pocong appeared, parents and children have not left their homes,” resident Karno Supadmo told Reuters. “And people will not gather or stay on the streets after evening prayers.”

As of Tuesday, Indonesia had reported at least 7,135 coronavirus infections, including 616 deaths -- more than any other Asian nation except China.

Widodo acknowledged last month that the government chose to keep the public misinformed about the state of the coronavirus in the country.

CLICK HERE FOR THE FOX NEWS APP

“Indeed, we did not deliver certain information to the public because we did not want to stir panic,” he said.

The Associated Press contributed to this report.