After decades of tacit acceptance, Japan's yakuza gangs are facing their biggest challenge: not from the police, but from ordinary citizens who are under pressure to shun the mob or be named and shamed.

Tokyo recently became the last of Japan's 47 prefectures to introduce local laws aimed at depriving crime syndicates of income by targeting firms that knowingly do business with them. Under the nationwide ordinances firms that help the yakuza earn money will be warned, and their names made public if they refuse to sever their ties. Repeat offenders face fines of up to 500,000 yen (£4,200) and company officials can face jail terms of up to a year.

The idea, say law enforcement officials, is to shame businesses into turning their backs on the mob. "It is going to be more difficult for the yakuza to collect funds," said Akihiko Shiba, a former police superintendent who is now a lawyer specialising in corporate compliance. "Police once concentrated on the gangs themselves, but the new approach is clamping down on those who help the gangs make money."

The authorities' fight against organised crime took another step forward on Thursday when the national police agency unveiled a new bill enabling officers to step up surveillance of the most violent gangs and take pre-emptive measures if necessary.

The yakuza, a network of 22 gangs divided into factions that compete for wealth and influence, have had to rethink their operations after crackdowns on traditional sources of income such as prostitution, loan sharking, gambling and drug smuggling.

Faced with depleting returns from traditional cash cows, many became active in the stock market, earning their money via front companies that appear to be respectable. The national police agency warned in a 2010 report that some firms had no idea they were dealing with the underworld.

"As crime syndicates have become very sophisticated in making their activities to acquire illicit funds opaque in recent years, it is quite possible that ordinary companies unknowingly conduct economic transactions with them," the report said.

In 2009 Takaharu Ando, then chief of the police agency, declared war on the yakuza, ending a long-established practice of tolerating the mob, which in turn kept down street crime and adhered to established rules of engagement.

The roots of that arrangement can be traced back to the 1800s, when the forerunners of the yakuza were permitted to carry weapons, provided they helped to maintain order when the police were short of manpower. The yakuza have since found it harder to bid for major construction projects through front companies, and to open new offices or buy private homes amid opposition from residents.

The prospect of being shamed in public, as well as losing potential customers and bank loans, has prompted some legitimate businesses and groups to sever their yakuza ties. Last year Enryakuji, a prestigious Buddhist temple near Kyoto, said it would refuse to allow members of the Yamaguchi-gumi, the country's biggest crime group, to pay their respects there.

The entertainment world was rocked by revelations that one of Japan's most successful TV celebrities, Shinsuke Shimada, had ties to organised crime. Shimada's immediate resignation was followed by vows from TV executives and a film studio in Kyoto to steer clear of the mob. A company that prints business cards said it would no longer accept orders from gang members.

But Japan's most powerful yakuza don ridiculed the latest crackdown. Depriving large numbers of gang members of their livelihoods could damage public safety, Kenichi Shinoda, head of the Yamaguchi-gumi, said in a rare media interview. "If the Yamaguchi-gumi were to be disbanded, public order would deteriorate immediately," he told the Sankei Shimbun.

The result, he warned, would be the creation of a population of dispossessed mobsters who could turn to violent crime to make a living. "Yakuza gangs are amazingly gentlemanlike," he said, citing the traditional respect for seniority that binds gangs together. "[We] adhere to those values more than ordinary people do."

The gangs themselves have produced manuals showing members how to sidestep the new laws. Some of the measures border on the banal: faxing documents rather than using made-to-order stationery, and cancelling contracts with outside caterers. The Yamaguchi-gumi is reportedly considering a ban on sending traditional gifts to business associates, and holds weekly meetings to discuss its response to the new ordinances. Other groups have distributed in-house guides to the legal changes, and even hold funerals for members on their own premises rather than risk entrapping privately run crematories.

"These moves demonstrate an awareness among gangs of how businesses they are associated with might fall foul of the law," an unnamed investigator told the Mainichi Shimbun. "We want to cut off the gangs' funding sources."

But innocent citizens, too, risk having their livelihoods ruined by unwittingly providing services to the yakuza, said writer Atsushi Mizoguchi, Japan's foremost expert on organised crime. "Some companies have already been named and shamed," he said. "They can't get bank loans, or lenders have cancelled existing loans. In a few cases they have even gone bankrupt. Before, it used to be the police v the yakuza; now it's the people v the yakuza. The police have taken a step back and put more pressure on companies themselves to confront the yakuza."

The police agency says total membership of crime syndicates fell from 88,600 in 1990 to 78,600 in 2010. Despite the dip, the yakuza remain a powerful force in Japanese society.

Incredibly, yakuza membership is not illegal, even if the new ordinances will make it more difficult for gangsters to earn a decent living. "In most other countries crime syndicates are banned, but Japan still recognises their right to exist," Mizoguchi said.

"The penalties for breaking these ordinances are quite light, but as the economy worsens, yakuza finances will weaken, so I at least expect to see more people dropping out of these organisations."