Eventually, my taxi reached a roundabout, and we turned left onto another thoroughfare, the Panthapath Tejgaon Link Road. There, the cabdriver executed a U-turn and a tricky sequence of maneuvers to win a place in a feeder lane that permitted entrance to the driveway of my hotel. The lane was empty: our final hundred yards of terrain to travel, and our first stretch of open road. The distance from airport to hotel was eight and a half miles. The trip had taken two and a half hours. We wheeled into the hotel’s driveway and the cabby spun around to offer his verdict. “Some traffic,” he said. “Not so bad.”

“BANGLADESH IS NOT so much a nation as a condition of distress,” wrote the journalist William Langewiesche in 2000. It sounds like an overstatement, but to behold the gridlocked streets of Dhaka is to see distress in action, or rather, in inaction. The stalled traffic in the capital city is symptomatic of the nation’s broader woes, in particular population growth, which is moderate by the standards of the developing world, but disastrous given the size of Bangladesh.

Fundamentally, traffic is an issue of density: It’s what happens when too many people try to squeeze through too small a space. Bangladesh is the 12th most densely settled nation on earth, but with an estimated 160 million citizens it is by far the most populous, and the poorest, of the countries at the top of the list. To put the matter in different terms: The landmass of Bangladesh is one-118th the size of Russia, but its population exceeds Russia’s by more than 25 million.

Bangladesh’s density problem is magnified in Dhaka, in part because, practically speaking, Dhaka is Bangladesh. Nearly all of the country’s government, business, health care and educational institutions, and a large percentage of its jobs, are concentrated in Dhaka. Each year, 400,000 new residents pour into the capital, a mass migration that has made Dhaka the world’s most densely settled megacity, and one of the fastest growing.

The town that those millions inhabit almost completely lacks the basic infrastructure and rule of law that make big cities navigable. There are just 60 traffic lights in Dhaka, and they are more or less ornamental; few drivers heed them. The main problem with Dhaka’s anarchic streets, though, is that there aren’t enough. The Daily Star has reported that just 7 percent of Dhaka is covered by roads. (In places like Paris and Barcelona, models of 19th-century urban planning, the number is around 30 percent.) Footpaths are also an issue. There are too few sidewalks in Dhaka, and those that exist are often impassable, occupied by vendors and masses of poor citizens who make their homes in curbside shanties.

The usual solution to congestion in cities like Dhaka is to move commuters under the streets rather than over them. But Dhaka has no subway, and no concrete plans to build one. The problem is compounded by the growing status-symbol appeal of private transport: a vogue for automobiles among Dhaka’s middle classes that is adding tens of thousands of new vehicles to the city’s streets every year.