“Japan doesn’t dance.”

That’s the feeling clubbers and night owls have had since 2011, when Japanese police begin shutting down dance parties and closing nightclubs right and left in a mysterious and pointless “war on dance.” If Footloose, the Kevin Bacon film from 1984, ever gets an Asian remake, Tokyo might be the place to shoot it. But a recent court decision in Osaka may make the police here reverse course in the unpopular dance club crackdown.

On April 25, the Osaka District Court acquitted Masatoshi Kanemitsu, the owner of a nightclub called NOON, of charges of “corrupting sexual morals” and violating adult entertainment laws in what Kanemitsu’s lawyer, Kenichi Nishikawa, called Japan’s first trial challenging its archaic “no dance” laws. “It was a victory for common sense and freedom to dance,” Nishikawa told The Daily Beast. “It is historic and significant, and while not finding the current laws unconstitutional, the courts ruled both that the police were too broadly interpreting the laws and that dance in and of itself is not a corruptor of public morals. Nor does it make people throw off their clothes.”

In Japan, dancing until the early hours in the morning with a cocktail in hand is technically illegal, according to an archaic law called the Law on Control and Improvement of Amusement Business. The Adult Entertainment Law, as it is known, dates back to 1948 and requires nightclubs to obtain a license to allow their customers to dance. They also must have 66 square meters of unobstructed floor space and close by midnight or 1 a.m. The law forbids the operation of any establishment that “has dancing which results in the disruption of public sexual morality.” If the police determine that a place of business is a dance hall and is not registered, the owners can be arrested. The law is a broad sword that the authorities have used to slice through nighttime entertainment nationwide.

While it’s true the infamous “dance halls” from the postwar Allied occupation were once a cover for prostitution venues, warranting the regulations in the Adult Entertainment Law, the places where people have danced and the customers themselves have changed. In addition, the Prostitution Prevention Laws (売春防止法), which went into effect in 1958, 10 years after the Adult Entertainment Law targeted dance halls, eliminated most of the problems. But the old laws remained on the books.

The police and nightclub owners had largely ignored the law for many years, but authorities starting bringing it back to life and “killing” clubs en masse in 2010. In 2012, the crackdown intensified in Western Japan and then later Tokyo. On the evening of April 4, 2012, during an English rock music event at NOON with approximately 20 customers in attendance, 45 police officers entered the club and arrested eight staff members. Several police were allegedly “undercover” dancing in the club gathering evidence. Good work if you can get it.

But it was a vicious murder at a disco in Tokyo in front of 300 people that really turned up the heat on nightclubs in the summer of 2012. On September 2 of that year, members of a gang called the Kanto Rengo clubbed a man to death in the VIP room at Roppongi’s Club Flower at 3:40 a.m. Since then, the police in Tokyo have been cracking down on nightlife in the city, and several nightclubs in the area have closed.

One reason for the Tokyo crackdown is a police effort to crush revenue sources for the Kanto Rengo, which was collecting protection money from nightclubs, bars, and dance venues in the area. A loosely structured organized crime group different from Japan’s traditional yakuza, the Kanto Rengo gathered power as the police clamped down on the old-school yakuza who were subject to harsher regulation under the organized crime control laws.

The police also consider dance clubs popular with drug users, particularly those using MDMA. When Special Crackdown on Illegal Drug Use Month rolls around, the vice officers want to score as many arrests as possible. Seasonal crackdown periods include Special Crackdown on Organized Crime (Yakuza) Month and Traffic Safety Week, in which police devote special efforts to targeting violators of designated criminal acts. One senior police officer acknowledged that raiding a nightclub suspected of violating the Adult Entertainment Law is easier to do than getting a search warrant for illegal drugs.

One Tokyoite unlucky enough to be present at a raid said of the experience: “The lights go on, the cops tell everyone ‘Put your hands up’ and line the club goers against the wall. We’re asked to turn out our pockets. Some people are asked to come to the police station for ‘voluntary’ drug tests. It’s clearly a drug raid.”

But more may be at work behind the crackdowns. “The issue may be more complicated than overzealous police,” said Ryan Hartley, a lecturer on academic English at Chuo University who has been conducting research on the dance problem. “There is speculation that some politicians are encouraging the crackdowns to clear out areas for real estate development that will benefit them or their constituents.”

Some critics have noted that in a country where stalking is largely unpunished and rarely prosecuted—and in the last two years several women or their family members have been killed by their stalkers after turning to the police—perhaps the police manpower could be put to better use. No one dies from dancing.

The Adult Entertainment Law is so broadly interpreted that it can target even something as innocent as enjoying salsa or tango dancing with a glass of red wine.

Public reaction to the “war on dance” has been largely negative. Japanese musical luminaries such as Ryuichi Sakamoto have openly protested and criticized the raids. Dance Protest rallies have been held nationwide since 2012. The Let’s Dance Committee, an organization headed by prominent lawyers and volunteers that seeks to change Japan’s old-fashioned laws, has gathered 175,000 signatures asking for dance to be deregulated.

Defending the crackdowns, the National Police Agency told The Asahi Shimbun in December 2012, “We need the regulations in order to eliminate anything that damages good public morals.” Asked for comment by The Daily Beast, a spokesman for the agency said, “We don’t speak to the foreign press.”

A copy of the NOON club verdict distributed to the press concludes “that these businesses do not disturb the order of public sexual morals and generate obscenity, and the pleasurable and fun atmosphere does nothing more than make the party lively.” In other words, the court seemed to agree with the Beastie Boys: The Japanese have a right to party. The judges added: “Therefore, the Article Two Section 1 of the Adult Entertainment Law should be interpreted in a limited way, rather than in an abstract one.”

In addition, the court recognized that customers’ dancing couldn’t be said to disturb sexual morals by itself. The court said the NOON DJ’s production, which included music and videos, did not go beyond making the party lively and did not willfully incite obscenity or encourage disrobing. It also judged that NOON did not fall under the regulations of the Adult Entertainment Law, suggesting that other clubs may have been improperly raided. “This decision is believed to have historical significance because it rules that the scope of the interpretation of the Adult Entertainment Law should be limited and not be applied haphazardly and broadly by the police,” the defense team said. “Dancing is not a menace to the public good.”

Although the charges against Kanemitsu were dropped, the court rejected the defense’s claim that regulations imposed by the Adult Entertainment Law violated the right to freedom of expression under the country’s constitution. Although the court has set a groundbreaking historical precedent, there is the possibility of more police crackdowns on nightclubs as long as the outdated law remains in the books.

“The wording on dance is still in the Adult Entertainment Law, so there is the possibility that the raids will continue in the future,” said Kaoru Hayashi, a representative of the Let’s Dance committee. “That is why we should aim to delete the regulations on dancing in the law in the future.” The organization has already collected at least 175,000 signatures on a petition to change the laws.

There’s no telling whether other courts throughout Japan will follow the Osaka Court, but with the 2020 Olympics approaching, Japan may find itself struggling to attract tourists to the Land That Sleeps Before Midnight.

“My opinion is that it’s natural that the owner would be acquitted. ‘He made them dance’ is a strange expression. The customers dance voluntarily, and it’s strange that the club is subject to punishment for letting them dance,” said Yae Wakabayashi, a 32-year-old Osaka clubber.

The prosecution may still appeal, although it has not yet done so. The Osaka Police has declined to comment on the case. But at the moment, it looks as if Japan is waltzing toward sanity in the regulation of “dance halls” and nightclubs, and that’s a happy tune that everyone can tap their toes to. Just as long as it’s not in a lewd and lascivious fashion.