We study empirically how competition among high-frequency traders (HFTs) affects their trading behavior and market quality. Our analysis exploits a unique dataset, which allows us to compare environments with and without high-frequency competition, and contains an exogenous event - a tick size reform - which we use to disentangle the effects of the rising share of high-frequency trading in the market from the effects of high-frequency competition. We find that when HFTs compete, their speculative trading increases. As a result, market liquidity deteriorates and short-term volatility rises. Our findings hold for a variety of market quality and high-frequency trading behavior measures.