Income taxes are a major expense for profitable corporations, often totaling 25% or more of pretax income. This study exploits the market for corporate control to test competing agency-based and risk-based explanations of corporate tax planning. Exploiting the staggered enactment of M&A laws across countries that increased the threat of takeover as an exogenous shock that allows a powerful difference-in-differences design, we find a significant reduction in tax avoidance following the takeover law passage. Our analysis suggests that reduced private benefits consumption (i.e., rent extraction) by management, rather than managerial effort aversion or increased risk concerns associated with aggressive tax strategies, is the likely mechanism through which takeover laws impact tax avoidance. Collectively, our findings extend the literature by highlighting the role of the corporate control market in shaping cross-sectional variation in corporate tax avoidance.