We study dynamics of capital structure in the oil sector, which has witnessed dramatic changes in the market conditions, such as significant changes in the price of oil, crucial reforms in legislation, and reduced access to credit over the last decade. Our analysis is focused on testing the main predictions of the tradeoff, pecking order, and market conditions models under a changing market environment. Our main contribution is to incorporate firms' heterogeneities related to indebtedness levels, share issues, long-term and short-term indebtedness within the capital structure analysis through the use of quantile regression as well as considering time dynamics. We identify general patterns in the sector, such as a preference in the oil industry for financing changes in investment through the issuance of new debt (mostly long-term debt). Generally, we find a changing capital structure across time and firms’ indebtedness characteristics. For example, oil firms with relatively high growth rates of new debt issuance are much more sensitive to changes in investment than firms with relatively lower rates of new debt issuance in a given year. Our results stress the importance of considering both time and cross-sectional asymmetries when explaining funding mechanisms adopted by a firm. Our study emphasizes the importance of time-varying aggregate factors on capital structure choices made by energy firms and therefore highlights the importance of policies that impact funding available for energy firms, independently of the idiosyncrasies that characterize their capital structure decisions. It also shed light on the importance of policies such as the establishment of anticyclical capital buffers in the energy industry.