This paper considers the problem of coordinating the vehicular traffic at an intersection and on the branches leading to it for minimizing a combination of total travel time and energy consumption. We propose a provably safe hierarchicaldistributed solution to balance computational complexity and optimality of the system operation. In our design, a central intersection manager communicates with vehicles heading towards the intersection, groups them into clusters (termed bubbles) as they appear, and determines an optimal schedule of passage through the intersection for each bubble. The vehicles in each bubble receive their schedule and implement local distributed control to ensure system-wide inter-vehicular safety while respecting speed and acceleration limits, conforming to the assigned schedule, and seeking to optimize their individual trajectories. Our analysis rigorously establishes that the different aspects of the hierarchical design operate in concert and that the safety guarantees provided by the proposed design are satisfied. We illustrate its execution in a suite of simulations and compare its performance to traditional signal-based coordination over a wide range of system parameters.Index Terms-Intelligent transportation systems, hierarchical and distributed control, optimized operation and scheduling, state-based intersection management, networked vehicles