We present a microstructure model of competition for order flow between exchanges based on liquidity provision. We find that neither a pure limit order market (PLM) nor a hybrid specialist-limit order market (HM) structure is competition-proof. A PLM can always be supported in equilibrium as the dominant market (i.e., where the hybrid limit book is empty), but an HM can also be supported, for some market parameterizations, as the dominant market. We also show the possible coexistence of competing markets. Order preferencing--that is, decisions about where orders are routed when investors are indifferent--is a key determinant of market viability. Welfare comparisons show that competition between exchanges can increase as well as reduce the cost of liquidity. Copyright 2003, Oxford University Press.