Efficient transportation, a hot topic in nonlinear science, is essential for modern societies and the survival of biological species. Biological evolution has generated a rich variety of successful solutions, which have inspired engineers to design optimized artificial systems. Foraging ants, for example, form attractive trails that support the exploitation of initially unknown food sources in almost the minimum possible time. However, can this strategy cope with bottleneck situations, when interactions cause delays that reduce the overall flow? Here, we present an experimental study of ants confronted with two alternative routes. We find that pheromone-based attraction generates one trail at low densities, whereas at a high level of crowding, another trail is established before traffic volume is affected, which guarantees that an optimal rate of food return is maintained. This bifurcation phenomenon is explained by a nonlinear modelling approach. Surprisingly, the underlying mechanism is based on inhibitory interactions. It implies capacity reserves, a limitation of the density-induced speed reduction, and a sufficient pheromone concentration for reliable trail perception. The balancing mechanism between cohesive and dispersive forces appears to be generic in natural, urban and transportation systems.