W hen Peter Drake appeared on the porch of his farmhouse, smiling through the gloom of an African dusk, it seemed as if there must have been a mistake. The kindly softness of his welcome seemed unlikely to belong to the type of man we had been expecting to meet. He ushered in his visitors, and it was not long before he had offered these strangers some supper and a bed for the night. He wouldn't hear of a hotel, and his wife was quite insistent.

'You must understand,' she confided, 'South Africans are very hospitable people.' Then she checked herself, and paused to reconsider. 'Well,' she corrected herself, 'South African farmers are, anyway.'

Peter Drake is a farmer, and his wife, Karen, is a ballet teacher. They live in the lush curl of a mountain pass in the north- eastern tip of South Africa, not all that far, Peter says, 'from Rhode_ I mean, Zimbabwe'. They grow fruit on the family farm and live in a roomy, remote house with their three sweet-natured daughters. The eldest is the local high-school beauty queen, and she drifted in and out throughout the evening, bringing teenage smiles and updates of the cricket on the TV next door. The Drakes lead a quiet life, and that is how they like it. But Peter was glad of the opportunity to speak about their one local difficulty.

He began by talking a bit about how he has come to disapprove of apartheid since its abolition, and about his fear that the ANC government is failing to enforce law and order. Politics per se does not really interest him, he confessed, but there is one issue that concerns him a great deal: he is monumentally worried about crime. This formula of views is extremely common among white South Africans, but the tone of his delivery suggested an unusually thoughtful mind, one in the habit of measuring up the morality of an opinion before venturing it. He carried on talking in his easy, level way, and presently remarked that whenever he sees massacres committed in Africa on the television, he is horrified. He asks himself how Africans can butcher their neighbours in cold blood. But then, he continued, he always remembers what his own team of farm hands is capable of, every time he orders them to abduct a local 'criminal', tie him up and whip the living daylights out of him.

'When I see how my committee guys are willing to give a guy a hiding, I see how these black atrocities in Africa get committed. You just wouldn't believe how brutal they are.' He paused, let out a low whistle, and shook his head. 'The black man, he's brutal.' His guys are so brutal, Peter has to stand over them while they administer the beating he has ordered, to make sure they don't go overboard and kill the man. 'I'm like the Nazi Gestapo guy,' he explained. 'I monitor the beatings.'

Peter Drake is a middle-aged farmer who thinks of himself as a decent man, but he is also branch leader of a South African organisation called Mapogo-a-Mathamaga. 'We say it isn't a vigilante outfit,' he remarked, 'but that's what it is.'

Mapogo was founded late in 1996 by a handful of black businessmen, originally as a local response to a crimewave in their small rural town. Today, its founding president, John Magolego, tours South Africa urging the public to sign up. The meetings he holds are not unlike religious revivalist affairs, and the vigilante action he preaches is straightforwardly candid.

'We don't consider that a criminal has human rights,' Magolego explained. 'He has got no rights of keeping his mouth shut when asked to tell the truth of his crime. If he keeps his mouth shut, we open it, and we don't spare the rod. We believe in corporal punishment. Our punishment,' - the words are trotted out in a happy sing-song - 'is always the sjambok on the buttocks of the criminal.' (The sjambok is a stiff, leather South African whip.) In his crisp suit and gold cufflinks, flanked by bodyguards, Magolego spelt out his organisation's contempt for Western-style justice in South Africa.

'The right to silence? No, no, no, we don't want that. And criminals should not have lawyers - they just help perpetrate crime. If I know you have taken my car and I've seen you driving it, then what the hell do you need a lawyer for? That's my car! And everyone knows that's my car! So the lawyer is just someone to get you off when you are guilty.' The Mapogo solution to crime is altogether more simple. 'The criminal must just be made to lie on the floor and feel the pain.'

When Peter Drake heard that Magolego was coming to address his home town last year, he remembers, 'I thought, this is like Father Christmas coming here.' He and other farmers were fed up with local break-ins, and with workers stealing produce and getting into drunken fights. Crime never used to be a problem, and they were unhappy about it, so they ordered their labourers to attend Magolego's meeting. Persuaded by what he heard, Drake promptly ordered every one of his 60 workers to pay up and join Mapogo, or leave his farm. He then selected a committee of eight farmhands - his 'top guys' - and the next time a crime was committed on his farm, Drake's unit swung into action. They caught a man laying a snare, tried him in a bush court in Drake's shed on the spot, and sentenced him to 25 lashes. Drake called the local farmers, who summoned all their workers to witness the inaugural Mapogo flogging.

Ever since then, Drake and his team have been busy all over the province, beating up blacks. Every Mapogo member is supposed to be active in solving and punishing fellow members' crimes, but in practice many prefer to call Drake and his team - a responsibility Drake takes seriously, but speaks of lightly, much in the manner of a gardener describing his latest solution to greenfly. Occasionally, Karen would chip in with the odd comment, and smile supportively. 'It's like beating a dog,' she murmured. 'You have to do it quickly, so they learn their lesson.'

A Mapogo court case is 'just like a normal court', Drake explained, 'but very condensed. We work swiftly.' When a victim contacts him, he and his team go and fetch the accused straight away, and drive him to a 'forsaken spot' where Drake interrogates him. 'If the guy denies the crime, we say OK, tell us who saw you not doing it. You see, it's a fair trial.' If the suspect still pleads innocence, Drake instructs his committee to beat him. 'Oh, and we wear Balaclavas,' he added, 'that's a must.' After a shortish beating, the perpetrator 'usually admits he did it', and Drake and his team then discuss the appropriate punishment. For smaller crimes, say the stealing of a pen, they would decide to give 15 or 20 lashes, but for a big crime it could be 150 to 200. 'The idea,' Drake explained, 'is if you hammer the small crimes, they don't get bigger. It began in New York, I think. It's called zero tolerance.'

The windows of the Drakes' house were heavily barred, and on the sideboard was a rifle, a bullet-proof vest and a two-way radio which connects the household with a chain of other white farms along the valley, so that assistance can be summoned quickly in an emergency. As a demonstration, Peter broadcast a request for responses, and a crackle of taut, pseudo-military barks came echoing back through the night - Karen smiled tightly as she counted them off on her fingers. These are the voices of frightened people who complain about what they consider the necessity of having to live under such conditions. Although they wouldn't say they still supported apartheid, they firmly believe that the new democracy is to blame.

'I know the black man through and through,' Drake repeated several times. 'I understand him, and democracy undermines the black man's historical bloodlines and traditions - what he understands is power and respect. You can't tell me you can teach an illiterate individual first-world principles, and I'd say 80 per cent of this country is illiterate. It's ruthless, the beating, but that's how these chaps grow up. I don't like what happens, but it has to happen; it's a system devised by the black man, for the black man - and it works. The blacks are like children: you have to be harsh and hard. And fair, obviously.' Mapogo membership is rising fast, despite the fact that at least eight members are in jail on murder charges. Peter Drake interprets any police action against members as 'harassment', and is thoroughly indignant.

'The thing that shocks me,' he reflected, 'is that I'm degraded to the level where I actually have to go out and lynch these people. I don't want to have to degrade myself like that. It's the government's job.'

This is a striking view of the job of government, but perhaps not as striking as the scale of its popularity. Mapogo now has approximately 60,000 members, the majority black, making it South Africa's largest vigilante organisation, but by no means its only one. Since apartheid was dismantled, recorded levels of every category of crime have risen dramatically, while the number of prosecutions and convictions has been steadily falling. When asked if they feel safe in the new South Africa, the majority of South Africans say that they do not, and confidence in the police has sunk to dangerously low levels. Crime dominated the national conversation in the 90s, but talk is now giving way to action as vigilante groups spread across the country, administering crudely improvised justice in the form of beatings and murders and bombs. Their strength has reached such levels that army trucks have even had to be stationed on the tourist beaches of Cape Town, and special police units have been set up to deal exclusively with vigilante crimes. But there is evidence of police officers themselves being active in vigilante groups, and the very concept of justice looks to be increasingly obscured by the swirl of conspiracy theories, corruption allegations and rival claims to righteousness endlessly staked by vigilantes, police and criminals. Vigilantism's corrosive effect on the distinction between right and wrong has profound consequences. With everyone claiming the moral high ground in the name of justice, it is less and less clear that anyone is upholding the law.

The relationship between crime and vigilantism, however, is perfectly clear. Mapogo is well known, but its members are concentrated in the rural north of the country where crime levels remain relatively low. It is in the big urban centres, where organised crime has doubled since the ANC took power, that a new strain of vigilante has emerged, one to make Peter Drake and his sjambok look mildly quaint. South Africa's organised crime problem now ranks second only to that of Columbia and Russia, and police files have identified 500 different gangs, describing a small number as 'extremely well-financed and superbly armed'. Several gang leaders have achieved the status of household names, and Cape Town, traditionally the nation's mother city, is now known as the gang capital of the new South Africa.

'Sea Point was full of big money. Nice money - casinos, bars, prostitutes. Nice big money, heh heh heh!' Gansie Uys is a senior member of a notorious Cape Town gang known as the Hard Livings, and he gurgled fondly as he relived the memory of his take-over of Sea Point, a lively strip of Cape Town which is no longer as affluent as it was before the Hard Livings moved in.

Uys was delighted to pose for pictures with his gun and his gangster tattoos, and talked proudly of the Hard Livings' achievements. He has had his four front teeth removed, though - a popular fashion statement among Cape coloured gangsters - and his words came out in a gummy slur.

'We took over everything. Prostitutes, they needed us to look after them, and they needed drugs. So they were our customers and our daily bread. Protection for the clubs, that was normal - if they don't pay, then it closes. You will be too scared to open if you don't pay us, so you pay. Maybe R4,000 or R5,000 (£400 to £500) a week. And then we sell our drugs inside. Mandrax, crack, cocaine, Ecstasy_ We pay the police off. They don't earn a lot. They are always hungry. No cigarettes,' he beamed. 'They are big boozers, and that makes it nice for us.' How many people did he think he had killed? 'Ooh, I don't know. Not many. Maybe 10.'

Uys's willingness to gloat like this on record gives some idea of how little the official forces of law figure in the minds of the gangs. White South Africans in cities such as Cape Town know this and, despairing of police protection, subscribe instead to armed private security companies with names like Sniper Security. Private guards now outnumber police officers in South Africa by 4.5 to one, and have been to known to stray outside the law in their line of duty. In the townships, people have learnt to rely on a more informal form of vigilante justice.

'The taxi guys are very powerful,' explained one young man who had recently used their services to recover stolen property. 'They're the people who don't give a shit.' The mini-bus taxi routes between the townships and Cape Town are traditionally lucrative, and rival operators have fought spectacularly bloody battles for control. The drivers acquired a fearful reputation as de facto elders - and so have come to function in some communities as the arbiters of local justice. This is an example of taxi vigilantism in action. A teenage girl on the Cape Flats was gang raped last year, and her family took her to the local taxi people. The young culprits she named were swiftly rounded up, and a makeshift kangaroo court followed, where the girl identified the rapists. The youths, barely more than boys, were stripped naked, tied up, and the girl was handed a sjambok and urged to give them a whipping. A TV crew filmed the whole affair, and harrowing footage of the boys screaming and bleeding caused a minor stir in liberal circles when it was broadcast.

But taxi vigilantism has been broadly eclipsed by more dramatic recent developments in Cape Town. An organisation calling itself Pagad - People Against Gangsters and Drugs - emerged in the city in 1996, and in due course it gave a public demonstration of its preferred method of dealing with crime. The media were invited to a Pagad rally, which began in a mosque with an address to a crowd of 4,000, and the following scenes were filmed.

'The legal process has collapsed!' screamed the speaker. 'There is nothing the police can do about the gangsters. Enough is enough!' A chant broke out, led by men in masks: 'Are the drug merchants and the gangsters your enemies? Yes! Are they the enemies of the community? Yes! So what must we do? Kill them!' The crowd poured out of the mosque into a convoy of vehicles, and descended upon the home of Rashaad Staggie, then leader of the Hard Livings. In full view of a massive police deployment, the mob swarmed around the house - Staggie appeared, and a masked man shot him through the head. Staggie fell to the ground pouring with blood, and an ambulance man rushed to help him, but another masked man got there first, doused Staggie in petrol, and set him on fire. As Staggie stumbled and lurched to his feet, wrapped in flames, the crowd bayed: 'God is great! God is great! While he lay dying on the pavement, 75 more bullets entered his body, and men swarmed around the charred corpse, kicking and beating his head. A helpless medical crew cowered in their ambulance, as the mob hammered on the windows screaming: 'Fuck off or we shoot you, too! Fuck off or you die!'

Staggie's televised killing was followed by the murder of more than 30 other senior gang leaders in drive-by shootings. The government took fright and made attempts to contain the group's violence, at which point the state itself appeared to become its new target, and Pagad's anti-gangster statements assumed an Islamic fundamentalist tone. A detective assigned to investigate the organisation was assasinated, and a series of bombs exploded across the city through the course of last year; a young British tourist lost her foot in one blast and the Foreign Office declared the city unsafe for tourists before Christmas. On Christmas Eve, a policewoman lost her leg in a booby-trap blast, and Cape Town passed into the new millennium under heavy police and army patrol. In January, a court was bombed on the day that two Pagad members were appearing. More than 50 members are now awaiting trial on charges of murder, extortion and related offences, and police chiefs speak privately of urban war. Undeterred, Pagad continues to speak publicly of victory.

'We will eradicate gangsterism and drugs,' a Pagad spokeswoman stated calmly, 'by all means necessary.' We met at Cape Town magistrate's court following a bail hearing for Pagad's leader, who had just been arrested and charged with the murder of Staggie, and she talked with a crisp, cool lucidity. 'Through the years, there have been many attempts to deal with the gangsters. It didn't work. Neighbourhood watches, police forums - it was not enough. A clear message had to be given to the gangsters. We are not interested in peace deals and negotiations, we are interested in eradication. We want to get rid of gangs - turn them off. And it is working.' While she was speaking, a crowd of Pagad supporters had gathered outside the court, and sturdy Muslim grandmothers in headscarves, pounding fists in the air, could be heard chanting over and over: 'One gangster, one bullet!'

Two questions present themselves in the face of scenes such as these. How was crime in South Africa allowed to reach levels that would provoke grandmothers to incite murder, and middle-class family men to don Balaclavas and whip their own workers? And why do these people, decent and law-abiding by their own estimation, imagine they have the right to terrorise a newly legitimised South Africa in the name of justice? The new government is commonly blamed on both counts, for being too incompetent to keep order - but the causes are more complex than that. A culture of crime and a spirit of vigilantism are considerably older than democracy in South Africa.

It is a political truth that the transition from any police state to democracy is always characterised by a weakening of law-enforcement structures. Uncertainty among the police about their changing future - and in some cases outright resistance - created enviable openings for criminals in South Africa, just as it has in the former Soviet Union. Police are also taking some time to learn the new skills of detection and investigation they need to combat crime, now that they are no longer able to rely on their old method of extracting 'confessions'. But apartheid did more than merely create a law- enforcement vacuum when it died: it spent its last years deliberately nurturing the very gangs who are now responsible for the crimewave in South Africa.

The origins of the modern Cape Town gangs provide the best illustration of this. They date back to the late 60s, when the coloured population of the city was forcibly removed and dumped in townships out on a bleak sheet of land to the east, persecuted by wind and dust, known as the Cape Flats. Gangs formed quickly in the shattered communities, but the police state was then efficient at putting their leaders in prison. When political unrest flared in the 80s, however, the police released these leaders and paid them to terrorise anti-apartheid activists in the townships. It was a cosy relationship in which gangsters bought their freedom with acts of violence on behalf of apartheid, and police duly turned a blind eye to their other criminal activities. When the apartheid state began to crumble, Cape Flats gangs were already in a strong position to exploit the disarray - and they believed they had a notional justification for their crimes.

'The political agreement chiselled out by the parties included the idea of amnesty for political offences,' explained Irvine Kinnes, who grew on the Cape Flats, and recently completed an MA on the gangs. 'To the gang members, this represented a freedom to commit crime and get away with it_ They didn't distinguish between their own crimes and those of the liberation movement - if political leaders were "getting away" with their crimes, why couldn't they?' It wasn't long before the gangs had progressed from street crime to racketeering, gun running and international drug smuggling.

If democracy inherited a gang problem, it has also inherited a long history of South Africans taking the law into their own hands. Rural black communities were not famous for being well served by effective policing, and so it was village elders who would administer justice. Migrant workers imported this tradition to the townships, communities also infamously ill-served by the state's police. White rural settlers, too, have traditionally considered themselves entitled to punish transgressions on their land without recourse to law, and Afrikaner animosity towards British rule was fuelled by irritation at the colonial habit of believing courts of law were the proper place to resolve disagreements.

Vigilantism thrives when the link between state and justice has been so corroded that any given group can indulge its often illegal desires - be it drug smuggling, racist violence or Islamic fundamentalism - and still present itself as a champion of justice. This corrosion has eaten so deeply into South Africa that even the gangs themselves are now affecting a public re-invention of themselves as the anti-crime guardians of their communities. They have formed a political movement called Core, purporting to signify their commitment to peace, and some 3,000 Cape Flats gangsters marched on parliament under its banner. The leader of the Hard Livings, Rashaad Staggie's brother Rashid, has recently converted to Christianity, turned his old shebeen into a church, and come up with a theory that gangsters themselves are 'new victims of apartheid' - a view that has been endorsed by some prominent church leaders. In this Alice in Wonderland analysis, the new government is to blame for the rise in crime, because it curtailed police powers and abol ished the death penalty. If criminals can now get away with murder, then nobody is safe - and so, reason the gangs, it falls to them to administer justice and keep the peace.

'It's better like this,' explained Gansie Uys, while opening a bottle of beer with a pistol. He prefers to call himself a community leader, not a gangster. 'We help the people, we protect them. The community likes us.'

There is an element of awful truth in this. Police corruption is so endemic, and incompetence so legendary, that many South Africans do regard local gangsters as their best hope of protection. One in four officers in Johannesburg was under investigation for a criminal offence in 1996. Such statistics are well known, and reports of negligence circulate daily. In January, for example, a Cape Town politician phoned a township police station to report a crime, but after 20 minutes nobody had answered the phone. When she gave up and drove to the station, she found lengthy queues waiting at the counter, several phones ringing - and the staff gathered around a TV, engrossed in an episode of The Bold and The Beautiful .

Police incompetence and corruption is nothing new, but its public exposure is, and each new revelation is oxygen for the vigilante movements. Peter Drake can claim that any policeman who opposes his activities must obviously be corrupt, fearful that a criminal might expose him during a Mapogo beating. Abreda Roberts alleges that Pagad 'has a lot of sensitive information on drugs and it involves police and politicians', and blames the spate of Cape Town bombings on officers trying to frame Pagad. Rashid Staggie accuses the police of using Pagad hit squads as a front to murder gangsters - and so it goes on. Between all the bitterly remembered injustices of the old regime, and the tangled flaws of the new, it doesn't require much imagination for a vigilante outfit to move the moral goal posts until its self- serving violence looks like public piety.

But even their most elastic logic cannot explain away one contradiction. If what they do works, then crime in areas where they are active should by now be under control. One Friday in January, a Flying Squad patrol car offered a tour of a typical night's work on the Cape Flats. It began at midnight with a shooting. We pulled up at a squat house surrounded by neighbours in dressing gowns, drawn by the commotion. Inside, a thin young man sat slumped, shirt off, elbows on knees. A woman mopped his head while a man held his jaw up, repeating urgently, over and over, 'Stay awake'. The young man had a bullet wound in his back, and his sunken eyes were hanging in shock and fear. He made no sound, and he was clearly dying. He had gone out for cigarettes earlier and been gunned down by passing members of a rival gang.

At a nearby hospital, staff had treated three gunshot wounds and 15 stabbings by 2am. As we arrived, a young man, naked to the waist, was walking in with a knife wound in his back like a pink, wet eye, and the oval pocket of blood slopped with every step. Armed guards patrolled the gates; the door was a metal detector; visitors were locked in the foyer behind bars. A nurse explained that this has become necessary because gangs follow the ambulances here and try to storm the wards to finish their victims off.

An hour later, a chaotic gun battle was raging between police and the occupants of a house being raided for drugs. A young man was eventually dragged out and slammed against the bonnet of a patrol vehicle. An officer pounded his face into the bonnet with one hand, and shoved the other hand between his legs, twisting higher and higher until the screaming man was flapping like a fish against the van. Other policemen clustered round kicking him, and a tall, bony officer, taut with fury, handed his rifle to a colleague, took out a pistol and whipped it over and over across the man's head. After two more suspects had been beaten and thrown in a van, the curdling frenzy subsided, and officers stood around and smoked and laughed, hot waves of adrenalin discharging into the cool night breeze. The police had already shot a fourth man in the house and as they escorted the ambulance to hospital, another gun fight broke out.

As dawn broke over the hospital car park, the police all remarked on what an unusually quiet night it had been.