JUST after 1pm on July 31st 2012 lights blinked out across northern India. It was the world’s biggest-ever blackout, affecting more than 600m people. It was also a swingeing blow to a transport system that had struggled to cope at the best of times. Hundreds of trains came to a halt in open country and in the tunnels of Delhi’s underground railway. Some passengers had to wait for hours in shirt-drenching heat.

Five years on, India’s famously creaky transport infrastructure is starting to look strong. The power on which parts of it depend has also become far more reliable. The embarrassing system-wide collapses of 2012, and an earlier one in 2001, are now scarcely conceivable. A rush to expand the electricity supply has been so successful that analysts now warn of a looming excess of generating capacity.

On paper, India has long claimed some of the world’s most extensive road and rail networks. That belied reality: roads were twisting, bumpy, crowded and dangerous. Railways were largely single-track, which caused delays, or narrow-gauge, which limited their ability to carry large loads. By car or train it was rare to sustain speeds of more than 50kph (30mph). Puzzled tourists wondered why distances that looked small on a map took forever to traverse. The rail network had barely expanded since the days of the British Raj, despite having to handle some 8bn passengers a year. India’s remoter corners were tied to the centre by the thinnest of infrastructure threads. Snows blocked passage to Kashmir for days at a time in winter; floods regularly cut off much of the north-east.

That is changing, too. In recent months Narendra Modi, the prime minister, has inaugurated India’s longest road tunnel and longest bridge. The tunnel slashes driving time between Jammu and Srinagar, the winter and summer capitals of the state of Jammu & Kashmir, by two hours. It also makes the route passable all year round. The new bridge (pictured when it opened in May) spans the vast and moody Brahmaputra river, a once-formidable barrier running through the north-eastern state of Assam. Another one nearing completion will, for the first time, link Kashmir by rail to the rest of India. Rising a dizzying 359 metres (1,178 feet) over a gorge, it is the world’s tallest railway bridge.

China does it quicker

With less drama, transport networks are being overhauled. The central government has doubled budgets for both road- and rail-building since 2012, to a combined total of close to $30bn a year at today’s exchange rate. Progress on building expressways has been unimpressive. Unlike in China, where the government has been able to build big roads at astonishing speed thanks, not least, to its ability to kick farmers off their land at will, in India a more litigious system makes it harder to appropriate land. India’s government is also more sensitive than China’s to farmers’ political opinions (in India they can vote in proper elections). Building roads from which their animals and tractors are excluded is unpopular in the Indian countryside. But local governments are paving and widening rural roads at a rate of 117km a day.

On the railways, better signalling and tracks have pushed up the speed of faster trains to a respectable 140kph. Work is about to start on India’s first dedicated high-speed rail link, a 500-km track between the western city of Ahmedabad and the commercial capital, Mumbai. When the first line of the Delhi Metro opened 15 years ago, many passengers were surprised by its fast, clean and efficient service. India’s capital now has six such lines, some running below ground. Seven cities have such rapid-transit systems. Eight more are building them.

More striking still is the growth in air traffic. Domestic passenger numbers have doubled since 2010, to nearly 100m a year. Last year alone the number surged by 23%. Indian airlines are snapping up new aircraft, with some 450 in operation and more than 1,000 on order. Mr Modi’s government has brought cheer to fast-growing private airlines. It plans to privatise much or all of the loss-making national carrier, Air India, and has also pushed through an ambitious scheme to encourage the use of smaller airports. Through a mix of subsidies and guarantees to airlines, plus ticket-price caps for passengers, the scheme aims to put 31 unused airports into passenger service and boost connectivity to 12 more that are reckoned to be underserved.

There will be plenty of power to operate them. Installed generating capacity has more than doubled since 2007. The capacity of power projects now being built should double it again from the present level, assuming they are all completed. Improvements to transmission are no less impressive. “We have a more advanced, more flexible grid than Europe’s,” enthuses Vinayak Chatterjee, an infrastructure consultant. He says the country can now more easily transmit power over long distances, such as from the north-east (which has a surplus) to the often undersupplied south.

The boost to India’s infrastructure has not been problem-free. An exuberant rush into public-private partnerships for big projects a decade ago left many private firms taking on bigger financial risks than they could manage. Many ventures stalled. Infrastructure-related deals are reckoned to account for around 10% of the nearly $200bn in non-performing loans that currently bog down India’s financial system.

The government’s own projects have not all run smoothly, either. A grim report by the state’s main auditing agency earlier this year painted a picture of incompetence and corruption in the Indian army’s Border Roads Organisation, which is responsible for building strategic roads along India’s mountainous border with China (see Banyan). Out of 61 roads that the agency was supposed to have built between 1999 and 2012, only 36% had been completed by 2016, the report revealed. Some of the unfinished ones came to a dead end in impassable gorges, or were abandoned because different stretches turned out to be impossible to join.

That is galling for India, which often rates its progress by comparing itself with China. Having spent three decades beefing up its own infrastructure before India began to get in on the act, the northern giant has set standards that India will still take decades more to match.