On 12 march, around midnight, less than a day after a devastating earthquake tore through the Tohoku region of Japan, causing a tsunami that killed thousands and left many more homeless, 25 trucks bearing 50 tonnes of supplies arrived in front of the City Hall in Hitachinaka, in the east-coast Ibaraki prefecture.

A hundred men in long-sleeves shirts and coats immediately began unloading the boxes. These men weren't the Red Cross. They were members of Japan's third-largest organised crime group, the Inagawa-kai. They had all taken great care to cover up their affiliation. Sleeves were rolled down to hide the ornate tattoos that characterise so many of Japan's yakuza members; those who were missing fingers all wore gloves. They were not wearing their gang badges with the bushels of rice and Mount Fuji in the background that are part of the Inagawa-kai symbol. Their corporate emblem – and all yakuza groups have them – was not on display. Some members of the yakuza even have the logo tattooed on their chests. Needless to say, no one was bare-chested that night.

They came under the cover of the night because they didn't want their donations to become a public affairs issue. Since 30 September, 2009, when the head of Japan's National Police Agency (NPA), the courageous Ando Takaharu, declared war on organised crime, life for these criminal groups has been hard. No one wants to be associated with them, and the Inagawa-kai was well aware that any high-profile operation, even one with charitable intent, could invite harsh police crackdowns.

Download the new Independent Premium app Sharing the full story, not just the headlines

Hitachinaka City Hall employees understood who they were. One of them recorded a video of the delivery, and they didn't refuse the supplies; it was no time to turn down aid. The main roads in Hitachinaka had been uprooted and split in half, electrical wires knocked down, sewage pipes exploded, the town's historical museum collapsed, over a thousand houses were damaged and by the 13 March, over 9,000 people were scattered in 68 shelters across the city.

The video, which I have seen, shows the gangsters unloading boxes of blankets, water, instant ramen noodles, bean sprouts, flashlights, batteries, paper nappies, toilet rolls: all the essentials of daily life in front of the still-standing City Hall. They were noisy, but fast and efficient. When they were done, they nodded to the city officials who watched on, and left. Another group would come back to the Tohoku region the next day.

The Japanese have been here before. After the great Kobe earthquake in 1995, the Yamaguchi-gumi, the largest of the yakuza groups, which has its fortress-like headquarters in the city, gathered supplies from all around the country and brought them to the stricken residents, dispensing hot food from their offices, patrolling the streets to keep down looting. The mobsters were lauded for being faster and more efficient than the government relief effort – goodwill on which they have been capitalising for over a decade.

The aid delivery to Hitachinaka was not an isolated incident. In the hours after the 11 March quake, major organised crime groups across Japan opened their offices to people who could not return home or find a way to go home. In Tokyo, a yakuza group called the Sumiyoshi-kai, which has its offices in the Ginza entertainment district, opened offices all over the city-state to those who needed it; one yakuza boss even extending invitations to members of the foreign community, non-Japanese residents. According to police and group sources, in the wake of the disaster, the Sumiyoshi-kai has collected over a million dollars from senior members and is distributing goods to Miyagi, Ibaraki, and Fukushima prefectures via front companies and associated members. In some areas, offices have become temporary shelters.

Yes, the yakuza has offices. In fact, if you want to know the addresses of the headquarters of the 22 major designated crime groups with a total membership of over 80,000 people, all you have to do is look on the NPA website.

Yakuza make their money from extortion, blackmail, construction, real estate, collection services, financial market manipulation, protection rackets, fraud and a labyrinth of front companies including labour dispatch services, database servers, and private detective agencies. Tokyo alone has over 800 front companies. The police know who they are and where they are. And so do most people in Japan.

A 24-year-old gas station attendant in Hitachinaka city, still living in a shelter as of 19 March, tells me he knew that the blankets and instant ramen he received came from organised crime.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

"Not all the yakuza are bad guys," he says. "It wasn't like they stuck around claiming credit for their work. They're not demanding the blankets be paid back with interest. Maybe some of them are really like Kiryu." Kiryu is the fictional hero of the long-running Sega video game, known as Ryu Ga Gotoku in Japan and Yakuza 1-4 in the West.

The yakuza – real-life yakuza, not the avatars or movie characters – are composed primarily of Korean-Japanese nationals and burakumin, Japan's equivalent of India's outcaste class (see box). They are also home to Japan's delinquents and many members are recruited from motorcycle gangs. Japan has a very modest state drug rehabilitation programme, and it is still not uncommon for parents of addicts to turn over care of their wayward children to a local yakuza boss, who promises to cure them. The unwritten rules of the yakuza world dictate that once you are placed in the care of a yakuza boss, you cannot go to the funeral of your own parents; the mob "father figure" (oyabun) is your only parent.

Despite the folklore surrounding groups, the modern-day yakuza are entrepreneurs, rather than the tattooed, nine-fingered thugs in white suits wielding samurai swords of popular imagination; think Goldman Sachs, with guns. A 2007 report by the NPA warned that the yakuza have even moved into securities trading and infected hundreds of Japan's listed companies, a "disease that will shake the foundations of the economy". The yakuza are innovative, powerful and disciplined, and their influence in Japan spreads further than the official line would have you believe.

I first learnt about Japan's yakuza when I started reporting on organised crime for the Yomiuri Shimbun, Japan's largest newspaper, in 1994. Like everyone else who joined the paper, I learnt the basics of reporting on the police beat, in my case, in Saitama, a rough Tokyo suburb. Over time, I became good friends with the cops who police the yakuza, and then later, some of the yakuza themselves, including Naoya Kaneko, a Sumiyoshi-kai gang boss. In the good old days, the cops and yakuza had semi-friendly relations – sometimes even dropping by the yakuza offices to chat with their organisational counterparts. It was Kaneko who first explained to me that while the yakuza are criminals, they also have rules.

In fact, most yakuza groups post a simple code of ethics posted on the walls of their offices for all to see. Below are the standards and practices for one yakuza group based in Tokyo:

1. It is forbidden to use any form of drugs or deal in them.

2. Theft, robbery, sex crimes, or any activity not in harmony with the noble way is forbidden.

3. It is forbidden to associate with any member expelled from the group.

4. All unnecessary contact with the authorities (the police) is forbidden.

5. Anyone breaking these rules is subject to discipline by the ruling council.

6. Younger members should respect older members; older members should respect younger members, nurture them, and get along for the mutual prosperity of all.

7. Engrave these rules in your heart and follow the noble path (ninkyodo).

"Ninkyodo", the so-called noble path, is a macho form of humanitarianism. According to scholars of the yakuza, it is a philosophy, originating from China, that espouses that every man has a duty to help those who are suffering and oppressed, even when it may mean risking his own life. The yakuza simplify it often as "help the weak, fight the strong". Yakuza groups refer to themselves as ninkyo dantai or "humanitarian groups".

This should not be taken at face value. Last year, I interviewed the late Igari Toshiro, a former prosecutor and anti-yakuza lawyer on the subject of the groups' so-called creed. "In reality, the yakuza prey on the weak and bow down to the strong," he told me. "In the old days, there was an understanding that yakuza were supposed to live in the shadows and not prey on ordinary citizens, but that hasn't been true for decades. However, sometimes some members live up to the ideals they espouse. If you're going to claim to be a humanitarian group, sometimes you have to do humanitarian work. Otherwise, you lose all credibility." (I spoke with Toshiro on 8 August, 2010 about yakuza and how they've changed over the years. It was the last time I saw him alive. He was found dead in his room in Manila a few weeks later. Before he left for Manila, he had told his editor, "I've been sticking my nose into some dangerous business. I'd like to make sure my last book can be published posthumously," and finished all the paperwork. He didn't survive to see it published. After reading it, I find it hard to imagine that there are many yakuza who would have been happy to see the book published.)

In truth, the measure of a yakuza boss is not how honourable he is, it's how much cash he brings in, a fact that might help explain the mobsters' motives for providing aid. A senior member of one organised crime group in eastern Japan acknowledges this. He says: "It's usually about money. Earthquakes and disasters are one of the few times that yakuza can do what they're supposed to do: help other people. We can do it because we're not bound by red tape. It's as simple as putting up the money, ordering the soldiers to buy supplies, put them on trucks, and carry them to areas where they're needed. Certainly some members are looking at this as a chance to gain goodwill and local support when the reconstruction begins. In my case, I just want to give back to the community where I was born. That's the spirit of the yakuza. That's the ideal. Other people have other motives."

Whatever their mixed motives, right now the yakuza are apparently helping the weak and the suffering, bringing warm blankets to those who are cold, feeding the hungry and getting water to the thirsty. The Sumiyoshi-kai and the Inagawa-kai in total have sent over 200 tons of supplies to devastated areas according to police sources and raised several million dollars from their own members to facilitate the aid. The Matsuba-kai, the Kyokuto-kai (both in Tokyo), and even smaller groups like the Aizukotestu-kai (in Kyoto) are all chipping in.

The Yamaguchi-gumi, under heavy police scrutiny, has done most of its work via civilian allies, called kyoseisha. The current acting leader of one faction, an old-school yakuza boss called Tadashi Irie, has been instrumental in organising support. According to sources close to the Yamaguchi-gumi group, members have been distributing cushions, first-aid kits, shoes, socks, food and garbage bags to stricken areas. In all, 800 members have been mobilised.

One Yamaguchi-gumi leader, based in Osaka, chartered several trucks and sent all 200 of his subordinates into disaster-stricken areas with supplies, allegedly even setting up temporary bathing facilities in Miyagi Prefecture and making sure victims received hot meals, according to Osaka Police Department sources.

One member of the Sumiyoshi-kai group I spoke to, a full-time gangster in the Saitama prefecture specialising in extortion, explains the efforts simply:

"In times like this, the usual societal divisions are meaningless. There aren't yakuza and civilians or foreigners and Japanese. We're all Japanese now. We all live here. Down the road, there is money to be made, for sure.

"Right now, it's about saving lives and helping each other out. Ninety-five per cent of all yakuza are human garbage. Maybe 5 per cent uphold the rules. Right now we're all doing our best. It's one of the few times we can be better than we normally are."

Even a senior police officer from Ibaraki agrees, speaking under conditions of anonymity. "I have to hand it to the yakuza. They have been on the ground from day one providing aid where others don't or cannot do it. Laws can be like a two-edged sword and sometimes they hamper relief efforts. Sometimes, outlaws are faster than the law. This is one of those times."

Other police officers see another side. One Osaka detective in the organised crime control division explains, "There's an aspect of this which is girikake (fundraising). The yakuza do this for funerals and other events. They ask all the lower members of the franchise to chip in funds and thus collect large chunks of cash. They've been doing it this time, as well.

"It's a great cover for collecting huge funds right from under our noses. I don't think all the payments they are collecting are going to aid relief. Maybe 10 per cent or more is staying in the headquarters accounts or in the pockets of some bosses." Veteran yakuza writer, Suzuki Tomohiko, is also a little more sceptical of the groups' motives.

"Certainly there are guys at the lower levels acting out of perceived duty. But when you consider that the yakuza take in about 5 per cent of the profits made in Japan's construction industry, you can also see why they're sending aid.

"They're paving the way for a share of the reconstruction loot. It would be foolish to imagine that some of them are not acting out of ulterior motives," Tomohiko admonishes, but then adds the following.

"When you're cold and hungry, I don't think you really care about the motivation behind the people who are providing you warmth, food and comfort. That's a secondary concern.

"Yakuza are people as well, with families, friends and relatives in the stricken areas. For once, they're living up to the code of honour they espouse. Let's hope that continues."

Why are the Yakuza so powerful in Japan?

There are a number of theories tracing the yakuza back to the feudal period of Japan and some groups, like Kyoto's Aizukotestu, date back to 1868. However, it was really following the Second World War that they gained power. In those years, joining the mob appealed particularly to disenfranchised returning soldiers; burakumin, the country's 'outcaste' class; orphans; and the many Korean-Japanese who had been brought into Japan as slave labour.

Today, of the estimated 80,000 members, almost half are led by Korean-Japanese. During the lawless period after Japan's 1945 defeat, the Korean-Japanese, who had been oppressed by the Imperial Japanese government, made inroads into the underworld. US occupying forces designated them "third party nationals", treating them differently than the defeated Japanese. This gave them access to US military supplies and enabled them to run the black markets.

In some ways, the 20th-century rebirth of the yakuza in Japan was a response to the domination of the black markets by the Koreans. The Koreans had formed their own small gangs, which would rob and pillage from other Japanese and then sell the same goods the next day on the black market. By April of 1946, the occupying authorities (General Headquarters, or GHQ) decreed that all those residing in Japan must follow Japanese law. But the Japanese police found their efforts to crack down on the yakuza hampered by GHQ's decision to decentralise the police.

At the same time, Japanese gangs who were fighting over black market turf with the Koreans began reviving the old yakuza structure, and incorporated many Korean-Japanese into their ranks: rather than wage direct war, they began a successful policy of assimilation. In some cases, the police actually backed the Japanese yakuza groups in an effort to restore order and limit the power and breadth of the Korean gangs.

In postwar Tokyo, the Kyokutokai, a yakuza federation of merchants and black market dealers, used their own Japanese-Korean members to recruit from the Korean side, eventually gaining partial control of city. Over in western Japan, the Yamaguchi-gumi played both sides, promising both to restore order and suppress the violent Korean gangs.

While the Yamaguchi-gumi was consolidating power in Tokyo with the aid of Korean-Japanese, the legendary Korean gangster, Machii Hisayuki, exploited GHQ's fears of a communist takeover to build his own criminal organisation; some of this is documented in Robert Whiting's seminal book, Tokyo Underworld.

In 1948, Machii created the Toseikai in Ginza, Japan's largest entertainment district. The group took over the gambling dens, the bars, the cabaret clubs, and the sex trade. By 1964, it had 1,500 members.

The following year, the Mainichi newspaper ran an exposé in which it referred to the Toseikai as "one of the most terrifying and influential underworld organisations in Japan". The Japanese police launched a full-scale crackdown on the group, and they disbanded, only to later re-form under a different name.

The yakuza reputation for keeping disputes between themselves and not harming citizens has protected them from the ire of the public and the attentions of the police. They have been considered "necessary evil" and a "second police force". Yet, they are still considered outlaws.

That ambiguity was supposed to have ended in 1992, when the government introduced the toughest anti-mob legislation in a generation. But, incredibly, the state still hasn't made membership of Japan's 22 designated crime groups illegal, or given the police the anti-mob tools long considered crucial in other countries: wiretapping, plea bargaining and witness protection.

It seems unlikely that the necessary tools to dismantle the yakuza will be given to the Japanese police anytime soon. In many ways, the yakuza are stronger than ever.

Jake Adelstein is the author of 'Tokyo Vice: An American Reporter on the Police Beat in Japan' (Vintage)