Thanks to a spate of stabbings and shootings we are going through a minor hysteria about London gang culture. It happens periodically. It’s mostly hypocritical because most of us will never see or touch it.

London has always had gangs, and they have almost always been centred on marginal or recently arrived groups. One obvious literary exception would be Peacham’s gang in John Gay’s satirical The Beggar’s Opera of 1728, who all sound thoroughly local — Jemmy Twitcher, Crook-Finger’d Jack, Wat Dreary, Robin of Bagshot, Nimming Ned, Henry Paddington and the rest.

A little over a century later Charles Dickens imagined a Jewish-led gang in Oliver Twist, whose child-recruiting Fagin was probably based on a real east London villain, the dapper Ikey Solomon. Dickens, as a fine journalist, had picked up on themes that would dominate perceptions of Victorian gangs — Jewish leaders and starveling children.

Some 15 years after that novel the journalist Henry Mayhew was interviewing and reporting on the vast, pullulating, colourful and tragic world of the London poor.

Among his interviewees was a young orphan pickpocket who had worked in a pottery and then been dismissed: “He met up with a gang of boys in a similar circumstance to himself. He said he was a good pickpocket and that he would rather steal from the rich than the poor because ‘they miss it less’. He also said that ‘Picking pockets... is the daringest thing that a boy can do’.”

For the Victorian middle classes, gangs, poverty and the perils of the (much more dangerous) streets were all more or less the same thing. Just as today, shoppers in the West End may be attacked by youths on motor scooters, so in the 19th century most people’s experience of gangs would be through the pages of Dickens, or the experience of being robbed in Trafalgar Square.

But the gang territories were closer to the everyday life of the middle classes: Soho and Seven Dials were notoriously dangerous areas, barely five minutes’ walk from glitzy shops and restaurants.

In 1866, a so-called “penny dreadful” was published, widely sold and quickly censored. The Wild Boys of London told the story of the street-fighting gangs of the capital; gang culture had already gone far beyond organised theft.

Their members, serving local “captains”, were aged between 16 and 22 and centred on very specific areas. Gang names included the Bow-Commoners, the Dove-Row gang, the Golden Lane Gang, the New Cut Gang, the Drury Lane Gang and the Lambeth Lads.

The book’s anonymous author explained: “While there are bodies of young men who roam about at night simply for the sake of mischief, when the regular gangs fight, it is for mastery.” Mastery of what? The fights happened, in the 1860s just as today, when one gang “invades the territory of another. Then there has to be some sort of rectification of frontier…”

The 20th century saw the very violent and notorious crime-syndicate gangs led by the Kray brothers and the Richardson family; but it also saw Irish, Italian, Jewish and even Maltese gangs forming to defend street territory against one another, on the model of the “wild boys”. Crime, politics and territory-defence began to merge.

There were the Whitechapel-based Yiddishers, who included the famous Jack Spot and fought Mosley’s fascists. There were the splendidly named Bessarabian Tigers; the Hoxton Mob, in fact based in Soho; Wag and Wal Macdonald’s Elephant and Castle Gang, and their deadly enemies, Charles Sabini’s Clerkenwell-based mob.

Those who think that today’s gang problem is something new should remember that in 1927, when Sabini’s gang defeated the Elephant and Castle Boys at the “Battle of Waterloo” outside the Duke of Wellington Pub on Waterloo Road, eight people died of knife and gunshot wounds.

In fact, all these gangs were violent, carried revolvers and formed complex alliances against one another — the Finsbury Boys and the notorious Cortesi family of Clerkenwell, for instance, against the Sabinis. After the Second World War their role was picked up by Maltese gangs, particularly in Soho.

What links today’s gang warfare with London’s long gang history is that for the vast majority of people it is still invisible, unless glamorised and packaged by the mass media. If you look at one of the available Met Police maps of London’s gang areas, the first thing you see is that a vast swathe of the centre of the city is completely free of gang activity — everywhere south of Regent’s Park, west of Spitalfields and north of Bermondsey.

Most commuters won’t pass through gang territory, and if they do, won’t notice it — the small coloured tags, the sprayed postcodes, the choice of designer clothing that means life or death to those in the know and nothing to the rest of us.

I live in north London, am reasonably aware and interested in my community’s history. Do I even see the boundaries between Camden Marliez and the Q C Blox, or the Bemerton Mardem, the Soldiers of Shakespeare, the London Fields Boys or the Essex Road Gang? No, of course not.

But young black Londoners lose their lives on gang territories. They have to make vast detours back from school. Even then, they’re caught “in the wrong place at the wrong time” because, for them, there are no right places.

For them, just as at the beginning of the 19th century or in the days of the wild boys of the 1860s, London gangs are a hidden, lethal part of life in the capital, a kind of second city, only glimpsed by the majority through titillating news headlines and crime-porn film-makers. As ever, if your skin is the right colour and you’ve got a decent income, my friend, you’ll probably be fine.