Sanwa is an unremarkable town north-east of Tokyo. Outside Sanwa is a cabbage patch on which battle lines are being drawn - on one side, behind a fenced-off compound littered with building material, looms a white warehouse with blacked-out windows secured with chicken wire. Inside are 30 white-robed devotees of Aum Shinrikyo (Supreme Truth), the doomsday sect that released nerve gas on the Tokyo subway in March 1995, killing 12 and injuring thousands.

At the other side of the cabbage patch is a hut with darkened windows. Behind them sit a team of locals who constantly scan the Aum compound with binoculars and note down any activity in a log book. "Some mornings you can hear chanting but it's very quiet right now," says salaryman Tatsuo Kaneko. "Aum claims the building is a printing plant, but what worries us is all those pipes coming out of the side." The cult lied for years about the function of another facility with lots of pipes. It turned out to be a factory making the Nazi-era nerve gas, sarin.

Kaneko and his neighbours are also worried by the giant shipping containers Aum has installed in the compound. The cult claims they are for storing rice, but the locals know it once used the same kind of containers as prisons and torture chambers for anyone who tried to flee the sect. Kaneko has spied something else unsettling through his binoculars: all the cultists have deathly-white faces but lobster-red feet. He believes this indicates Aum has revived an agonising ritual it called "thermotherapy", in which followers are "purified" in a bath of scalding water. The practice has killed at least one follower in the past.

The past is where Sanwa residents thought Aum Shinrikyo belonged, until it turned up on their doorstep. After the Tokyo subway attack, police arrested Aum's partially blind guru Shoko Asahara and hundreds of his devotees. The cult was stripped of its religious status and declared bankrupt, and its facilities near Mount Fuji - including the mammoth sarin factory - were bulldozed to the ground. But while Aum is designated a terrorist group by the US state department, it was never outlawed in Japan, where the authorities seemed to believe it would just fade away. They were very wrong.

Aum's revival is astonishing. Not only has it survived its years in the wilderness, but it is expanding again at an alarming rate. It now has about 2,000 followers, including 500 hard-core devotees living in cult-owned facilities. It earned a staggering £30m last year from its shops, which sell cut-price computers assembled by unsalaried followers. It is distributing millions of booklets in which new recruits explain how Aum teachings have given them supernatural powers. It even has its own pop band, called Perfect Salvation, which performs songs written by the guru himself.

The cult's expansion has sparked fear and anger across Japan. Last month in Tokyo a pair of followers handing out flyers for the sect's computer shops were stabbed by two unidentified attackers; the cultists were slightly hurt. Aum members have been hounded or evicted from several properties, in one case after the cult acquired a Tokyo apartment in the same block as a woman whose husband had perished in the subway attack.

Residents in Kitamimaki village in central Japan stormed an Aum-owned house in their area and ejected the followers. Then they dug a deep trench - topped with barbed-wire - around the property to stop Aum followers returning. Their actions were extreme but understandable: Kitamimaki is not far from Matsumoto city, where Aum released sarin in 1994, killing seven people and injuring 144 others. "First we have to remove the immediate threat, but it's not the ultimate solution," says a Kitamimaki teacher, who requested anonymity. "We're just shifting rubbish from one place to another." Cultists evicted from Kitamimaki have been spotted on the other side of that cabbage patch in Sanwa.

The Japanese police were derided in the aftermath of the Tokyo subway attack for failing to halt Aum's murderous rampage. So far their response to the current expansion has been to raid cult premises in connection with shady property deals and arrest one follower - a clumsy strategy, and probably counterproductive. Filtered through the warped mentality of a young Aum member, the raids prove only that the state is vindictive, out of control and bent on destroying Aum. And that is exactly what the guru has been saying all along.

Shoko Asahara shuffles into a Tokyo courtroom in shabby blue sweatpants. His once-flowing beard is shorn to prison-regulation length and flecked with grey, and his almost sightless eyes are squeezed shut, as if he is flinching. Now in his mid-40s, he slowly lowers himself into his seat like an old man. He is obscured by a wall of guards, there to prevent the Aum followers in the front two rows of the public seating area from touching their guru.

This frail, shambling figure once ran one of the richest, best-armed and most murderous groups the world has seen. Born into a poor family in southern Japan, Asahara sold quack medicine before starting the one-room Tokyo yoga school that would become Aum Shinrikyo. Asahara exploited the spiritual vacuum left by Japan's economic boom years by offering what seemed like an alternative to Japan's straitjacket society. A charismatic father figure, he claimed his devotees could read minds and levitate, and thousands of alienated young Japanese, raised on comic-book superheroes, believed him. At its peak, Aum boasted 10,000 Japanese members and another 30,000 in Russia.

But Asahara wanted more. He said Aum had to arm itself if it were to survive the coming apocalypse. Brilliant young scientists were recruited from the best universities and installed in cult laboratories near Mount Fuji. Exploiting his organisation's religious status and the blundering of the Japanese police, Aum produced a terrifying arsenal of biochemical weapons, including advanced nerve agents such as VX and killer diseases such as anthrax and Q-fever.

Led by its increasingly power-crazed and deluded guru - Asahara now claimed to be Christ and the Lord Buddha - Aum span out of control. Followers were starved, doped with LSD and forced to undergo bizarre initiations. The cult's enemies were murdered and incinerated in purpose-built microwave ovens. The madness culminated in a rush-hour assault on Tokyo's subway, an attempt to halt a police investigation into the cult. This unprecedented crime stunned Japan and forced security experts in major cities around the world to rewrite their anti-terrorism manuals.

"He's lost weight," says Shoko Egawa, scrutinising Asahara from her seat at the back of the courtroom. Egawa was the first journalist to investigate the cult. A slight, bookish-looking woman, her dogged reporting so enraged Asahara that a follower was dispatched in 1994 to kill her. Egawa was woken up in the night with a searing pain in her throat as the follower pumped phosgene, a first world war choking agent, into her apartment. She survived to write seven books on Aum - and to see Asahara humbled in the dock.

Asahara faces 17 counts of murder and attempted murder, as well as charges such as kidnapping and drug trafficking. He has pleaded not guilty to all of them and maintains his followers acted without his knowledge. But the convictions and confessions of former devotees have fatally weakened his defence. Last October an Aum follower received the death sentence for his role in the savage 1989 murder of an anti-Aum attorney, his wife and their infant son. Another cultist told prosecutors how he murdered a 21-year-old follower who wanted to leave the sect: "I felt a sense of mission that I had to kill him. I wrung his neck pretty hard, and soon I felt his neck break."

The glacial pace of the Japanese justice system means Asahara's trial could last 15 years or more. Few people doubt the outcome: he will hang for his crimes.

"It is unthinkable for us that the guru ordered murder, as people believe he did," says Hiroshi Araki, Aum's PR chief, a mop-topped 30-year-old who wears a pajama-like white suit. Araki has been singing Aum's praises since he met his guru while studying history at Kyoto university. "My first encounter was the most profound experience," says Araki dreamily. "I felt my mind fuse with the guru's. He is too great for me to understand."

Taro Takimoto is dedicated to putting the brakes on Aum's current growth. He runs a support network for more than a hundred ex-cultists called the Canary Group. It is named after the canaries used by police as sarin-detectors during raids on the cult's compounds in 1995. Fifty of the group's members have now got jobs or college places, says Takimoto, while the rest are still recovering from years of physical and mental abuse. "Only a handful have really got over it," he says. Takimoto himself narrowly escaped assassination in 1994 when a teenage Aum member injected sarin into his car.

Takimoto's battle against Aum is an uphill one. Thousands of young Japanese have each paid between £10 and £250 to attend Aum meetings in the past 18 months; some have paid up to £2,500 in joining fees. The cult may also be active in Russia, where it is banned. When I volunteered to join the sect through Aum's English-language website, I was asked to make a donation to establish my "carmic [sic] connection" with Asahara, then given the details of a Moscow bank account.

If young people are still joining Aum, it is because all the factors that created Aum's membership in the first place still exist. Japan is still a rigid society that stifles individualism and Aum exploits this - as it does the general sense of unease generated by Japan's stagnant economy and the approaching millennium. Even so, it is remarkable that Aum's revival is based on selling exactly the same product as before.

Armageddon remains the cult's pivotal concept. We are now living in an age when "evil of all kinds thrives," Araki explains. "This evil will be shed in a "catastrophic discharge" made manifest in wars and natural disasters, such as the Kosovo conflict or a recent storm in Sydney in which there were hailstones the size of golf balls. Only those who "repent their evil deeds" - and, Araki suggests, follow Aum - will survive to enjoy a "golden age".

Could Aum again develop the potential to give this catastrophe a nudge? Last year Japanese police unearthed sarin precursor chemicals hidden by Aum in mountains north of Tokyo, a discovery that made observers wonder what else the cult was hiding. A few months before that a self-declared Aum member threatened via a daily newspaper to release gas at 11 Moscow subway stations.

In its continuing crackdown, as well as arresting one follower police have confiscated more than half a million leaflets. Not surprisingly, Aum isn't getting anyone's sympathy: the cult has never apologised or expressed remorse for its past actions. Araki knows an apology is vital before the cult has any chance of a normal relationship with Japanese society, but it appears the cult's six leaders have not come to the same conclusion.

The authorities could have outlawed Aum under a draconian 1952 law against subversive activities, but decided the sect did not pose an "immediate and obvious threat" to public safety. Recently there was talk of restricting Aum with an amended anti-subversive law, but the government ruled that out last month amid vague promises to draft a specific law to target the cult.

Meanwhile clumsy policing and political paralysis will continue to provide the conditions for Aum to thrive. From the rooftop of his PR headquarters in northeast Tokyo, Araki looks out across the suburban sprawl towards the detention centre where his guru is incarcerated. "When we face agonies or spiritual difficulties we cannot solve," says Araki, "followers come up to this roof and offer a prayer towards his direction." For now at least, those prayers are being answered.

 Andrew Marshall is co-author of The Cult at the End of the World: The Incredible Story of Aum (Arrow, £5.99)