This paper studies the macroeconomic effects of oligopolistic competition in the financial intermediation sector. Motivated by a recent increase in the concentration of the US banking industry and several empirical facts about the effects of bank competition on firm dynamics, I develop a novel dynamic general equilibrium model with oligopolistic banks and heterogeneous firms. Strategic interactions among oligopolistic banks generate endogenous financial frictions that shape firm investment and financing dynamics, affecting aggregate productivity. I introduce two sources of aggregate shocks: a sudden increase in the aggregate firms' default probability and a “big bank” failure (e.g. Lehman Brothers in 2008). When the probability of firms’ default increases, banks exploit their marker power to extract higher markups and credit spreads increase. This allows banks to compensate for the larger losses due to defaults, but it leads to a larger decline in real activity. When the economy is also hit by a ``Lehman shock'', the model accounts both qualitatively and quantitatively for key macroeconomic and financial features of the Great Recession. In an extension, I also study banks' market power in a model with idiosyncratic firms' TFP shocks and endogenous default. Higher concentration in the banking sector reduces the frequency of firms' default, and makes the economy safer, but less productive.