This study explores the role of taxes in explaining companies' financing decisions. We test whether the corporate tax shields explanation of capital structure is applicable to firms listed on the Spanish stock exchange over the period [2007][2008][2009][2010][2011][2012][2013]. Taxes are found to be economically and statistically significant determinants of capital structure. Our results suggest that marginal tax rates affect the debt policies of Spanish listed companies, and the existence of non-debt tax shields constitutes an alternative to the use of debt as a tax shelter. Consistent with theoretical expectations, there is a stronger relation between debt and taxation in less levered firms. Finally, we empirically estimate the impact of the new thin-capitalization rule put forth by the Spanish government in 2012 on the financing behaviour of Spanish listed companies.Francisco Sogorb-Mira gratefully acknowledges financial support from Ministry of Economy and Competitiveness Research Grant ECO2015-67035P. The authors wish to thank the Co-Editor, Manuel Bagues, and two anonymous referees of Journal of the Spanish Economic Association (SERIEs) for insightful suggestions and advices that substantially improved this paper in many ways. We are also grateful to Juan Ayuso from Banco de España and Domingo García from Bolsas y Mercados Españoles for their help in providing some economic and financial data. Finally, we would also like to thank Pankaj Sinha, Antonio Ruiz-López, Juan A. Sanchis-Llopis, Juan M. Villa-Lora, Anna Toldrá-Simats (discussant) and the participants at the XXII Finance Forum at University of Zaragoza in 2014 and the Research Seminar at University of Valencia in 2015 for helpful discussions and useful comments on previous drafts of this paper. Any errors are our sole responsibility. Our empirical evidence supports the existence of a tax reform effect, where companies affected by interest deductibility limitations reduce their leverage more than companies that are not affected.