Twenty million people, most of them bad drivers, whizzing around a smoggy city a mile above sea level: Mexico City doesn't seem like the ideal place to navigate by bike. Before I moved here a few months ago, I almost put my Bianchi into storage. But I packed it at the last minute, and thank goodness. Mexico's sprawling capital is one of the most bike-friendly cities I've been to. It beat London to the bike-hire business with the launch of its Ecobici scheme in February. And it's still ahead in two other areas, which cities in Britain could and should copy.

The first is shutting off stretches of road to cars. La Reforma, the eight-lane highway that runs through the middle of the metropolis, is closed to cars every Sunday and turns into a riot of bikes, rollerskaters and joggers. Families come to whoosh round and round the majestic Ángel de Independencia, and shoppers and tourists use it to zip into the city centre, which is far quicker by bike than by metro (though that is speedy, too, and at 15p somewhat more tempting than the Tube). Nor does it seem to mess things up too much for motorists: I drive in the city as well, and Sundays are no more clogged than the rest of the week.

Britain has a few similar schemes. This month and next see a series of "Skyrides" across the country, where roads are shut off in the same way. Last year there were five; this year there are 13, from Glasgow to Southampton. Long may they proliferate.

But Mexico City shows how much further Britain could go. The La Reforma route is 24km (15 miles) long, and open every week, while a longer 32km (20-mile) route is open once a month. Last year's London Skyride was just 15km long and lasted all of one day. Boris Johnson says, admirably, that he wants his city to be the world's cycling capital. But London is being trounced by a country whose average income is just over $10,000.

Mexico also has lessons for Britain in what urban planners call "shared space", and what everyone else calls a free-for-all. One of the distinctive features of British roads is that space is strictly allocated and ruthlessly guarded: cyclists give an earful to motorcyclists who nudge into the cycle-box at traffic lights; pedestrians vent fury at cyclists who stray on to the pavement. It's horrible.

Other countries are more relaxed. In Seville, for instance, the city centre is open to pedestrians, cyclists and trams, all of which just have to keep an eye out for each other. Here in Mexico, cycling on the wider pavements, carefully, is allowed (even the police do it). And a lot of the quieter crossroads are unmarked, relying on cyclists' and drivers' caution rather than forcing people to sit at red lights when no one is around.

This kind of thing must seem like blasphemy in Britain, which likes to think of itself as more liberal than its Euro neighbours, but actually rather likes its rules and regulations. The ban on cycling in some parks reminds me of the extraordinary law against so-called "wild camping" (known to the rest of the world simply as "camping"), and relies on the same dismal logic that because some people are thoughtless, no one can be trusted.

Some parts of Britain are experimenting with loosening the rules: a "shared space" project is planned for London's museum district and in Ashford, cars, cyclists and pedestrians have equal priority. The best thing to happen to Leeds when I was growing up there was the pedestrianisation (and, from memory, bike-ification) of most of the city centre. In these cases, at least, fewer rules has meant better behaviour.

I have one reservation about recommending these schemes more broadly in Britain: I'm not sure we are nice enough. I always resisted the temptation to complain about London being unfriendly – it's the same with any big, anonymous city, I told myself, as people shouted at me for being in their bit of road (women have it much worse, as this illuminating blog reveals).

Well, Mexico City is nearly twice as big and faces social problems graver than anything Tower Hamlets has seen in a few decades. But its inhabitants are much, much more easygoing. Last week I saw a cyclist almost taken out by a thoughtlessly opened car door – he and the driver ended up having a joke about it. Would that happen in London or Leeds?

Shared space works very well over here. The only thing that might stop it working in Britain could be Britons.