Image copyright ALAMY

In many places you need to pass written and practical tests to get a driving licence - but not in Mexico City. For now, all you need here is a few papers and a bit of cash.

To be honest, I'd been putting it off for months. I'd heard it was easy to get a driving licence in Mexico City, but something about the peeling green paint of the Public Ministry offices seemed to epitomise Mexican bureaucracy and paperwork.

I'd pictured hours spent in long queues and filling out form after form, copies in triplicate of everything from my birth certificate to my fingerprints and, of course, a medical record showing I was fit to drive. All of which, you might imagine would lead towards some kind of test of my basic driving ability.

How wrong I was.

First off, the expected queues were non-existent. I arrived as a gentleman ahead of me was finishing up and was immediately ushered to take a seat in front of a very brisk Mexico City government official.

"What do I need to do to get a licence as a foreigner?" I tentatively asked the bespectacled lady behind the desk.

Find out more Image copyright Getty Images Listen to From Our Own Correspondent for insight and analysis from BBC journalists, correspondents and writers from around the world Broadcast on Radio 4 on Saturdays at 11:30 BST and BBC World Service Listen to the programme Download the programme

"A copy of your passport, your resident's card and a recent utility bill," she rattled off, barely looking up from her computer screen.

"Anything else?" I asked, assuming she was just drawing breath.

"Fill in a copy of this form and pay 677 pesos (that's about $50/£30) at one of these three supermarkets."

"That's it?" If those really were the only requirements, I could have the paperwork done by this afternoon.

"That's it" she answered firmly, making it clear that if I lingered any further I'd be wasting her time.

I shuffled out back into the sunlight, and went to gather together my documents.

Mexico City is huge, a sprawling metropolis only rivalled in the region by Sao Paulo in Brazil. Some 2,200m above sea level, its thin air is clogged with the smog and noise of around four million vehicles circulating on its streets every day. Yet if they're from the capital, not one of those drivers has ever been required to take a test.

Image copyright Getty Images Image caption Mexico City seen through the smog

But that is due to change soon. The left-wing mayor of the city, Miguel Angel Mancera, has signed a new law which will require all drivers to take a basic aptitude test. Their eyesight will be examined as will their driving skills with both a theory and practical exam.

Hence my new-found haste to get the paperwork done before the law comes into force later this year.

Image copyright Getty Images Image caption Mexico City road sign: "The pedestrian has priority. Preferably alive, please."

I'm lucky enough to be able to walk to work -- a distinct luxury in a city this big. But I've still done enough driving in rental cars to know that Mexico is not the safest country in the world. On my first foray onto Mexico's roads, a woman backed into our parked car within the first few hours, denting our side door and wing.

It is not uncommon to see overburdened lorries shed their loads and stop signs are often considered friendly advice rather than strict instructions.

An estimated 17,000 people are killed on the roads in Mexico every year and lobby groups have long called for tighter regulations.

The tide, however, is slowly turning. Drink-driving, for years considered a minor infraction, is now being taken far more seriously in Mexico City, with a marked increase in the number of random breathalyser tests particularly around Christmas and public holidays.

A series of traffic calming measures have come into force too, such as the controversial Hoy no Circula law in which cars with certain number plates are banned from the roads on specific days. The law is tied to an emissions-monitoring programme aimed at removing the worst polluters - including the city's once emblematic taxis, the pre-catalytic converter Volkswagen Beetle - from the streets.

Image copyright ALAMY

As so many people depend on their often old and environmentally-unfriendly cars for work, the move, while good for Mexico City's air, has not been met with universal approval.

There has also been a boom in biking in this most motorized of capitals. The Eco-bici - the Mexican equivalent of the Boris Bike - has been a great success. Commuters, young and old, who would previously have added to the city's heaving public transport system can now be seen weaving through the traffic on the distinctive red-and-chrome rented bicycles. Given that so few of the drivers around them were ever tested before they got behind a wheel, that's a brave choice.

So clutching my photocopied documents I returned to the Public Ministry building, my form correctly filled in and a receipt for 677 pesos in my hand. Ten minutes later, I became the proud owner of one of the Mexico City government's prized plastic driving licences. Now, if I could just remember how to parallel park.

More from the Magazine

Image copyright AP

Next time you complain about being stuck in traffic, spare a thought for the drivers in Brazil's biggest city, which has some of the worst congestion problems in the world.

Friday evenings are a commuter's worst nightmare in Sao Paulo. That's when all the tailbacks in and out of the city extend for a total of 180km (112 miles), on average, according to local traffic engineers, and as long as 295km (183 miles) on a really bad day.

The city with 180km traffic jams (September 2012)

How to listen to From Our Own Correspondent:

BBC Radio 4: Saturdays at 11:30

Listen online or download the podcast.

BBC World Service: Short editions Monday-Friday - see World Service programme schedule.

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.