For the first time in history there are more people living in cities than outside them. This is just one of the striking statements in the United Nations' State of the World's Cities report, which pinpoints the development of "mega-regions" – gigantic conurbations such as the Pearl River Delta in China, which has a population of about 120 million. This report concentrates on something unprecedented but, in the horrified reactions it has caused, it has tapped into something very old.

We should not be so smug as to condemn the endless cities, not least because they started in Britain. The evils of overpopulation and pollution that invariably attend discussion of China's hyper-industrialisation were worried over in an equally hypocritical fashion 150 years ago, when Britain became the first nation to have more of its population in cities than in the countryside.

Before English urbanisation exploded in the 19th century, cities were often strictly bounded by walls. There had been the odd megalopolis – Rome, Istanbul, Baghdad – but nothing like London, which within 200 years absorbed not merely neighbouring Westminster but towns from Highgate to Croydon.

In the north of England the situation was, if anything, more pronounced – in the Cottonopolis of industrial Lancashire towns which seemed to have sprung up overnight. Just as today, this led to fears of the destruction of the countryside and the creation of a huge, uncontrollable urban proletariat which, unlike the peasantry that preceded it, could not be relied on to bow before God and King, rejecting what Marx and Engels called "rural idiocy". The very first of the "endless cities" to emerge were Greater London, Greater Manchester, the Black Country, the West Riding, Tyneside, and in Scotland, Glasgow.

In a sense, Britain is as much a megacity region as the Pearl River Delta – some demographers refer to a continuous megalopolis stretching from London to Edinburgh, with a population of 53 million. The reason why it doesn't feel like one giant city is because of 19th- and 20th-century reforms by those who wanted to tame not only the new supercities but also the unrestrained capitalism that produced them. Sometimes this was a matter of measures to make urban life bearable, as a defence against urban insurrection – sewers, public parks, and new public transport networks – but pressures to stop the growth of cities often came from the left.

What is disturbing in the UN report – something made clear in Mike Davis's book Planet of Slums – is that some of these megacities have never been made bearable. In the 19th century the rationalist dream of the ordered city that you can still see in, say, Newcastle's Grainger Town, would be rudely interrupted by the unplanned, smoke-belching, unsanitary sprawl from which it made its money; Davis points out that the new megalopolis might well be on the model of Kinshasa, which lacks the most basic urban infrastructure for its 10 million inhabitants, rather than the Blade Runner image of southern China.

Although supercities have always horrified environmentalists, they shouldn't. With their relatively short distances easily served by public transport, they are in fact greener than the countryside; a recent academic report estimated that cities produce less than two-fifths of greenhouse gas emissions. What is worrying about the "endless city" is that it may lack the public spaces and networks that make urban life superior. The cities of hyper-capitalism, with their gated communities, "urban villages", pseudo country villas and private transport, are malevolent because they try to simulate the countryside. The megalopolis need not be the cause for handwringing – but only if city dwellers claim as their own the freedoms of city life.