Abstract-This paper proposes a novel distributed control strategy for large-scale deployment of flexible demand. The devices are modelled as competing players that respond to iterative broadcasts of price signals, scheduling their power consumption to operate at minimum cost. By describing their power update at each price broadcast through a multi-valued discrete-time dynamical system and by applying Lyapunov techniques, it is shown that the proposed control strategy always converges to a stable final configuration, characterized as a Wardrop (or aggregative) equilibrium. It is also proved that such equilibrium is socially efficient and optimizes some global performance index of the system (e.g. minimizes total generation costs). These results are achieved under very general assumptions on the electricity price and for any penetration level of flexible demand. Practical implementation of the proposed scheme is discussed and tested in simulation on a future scenario of the UK-grid with large numbers of flexible loads.