We examine optimal monetary policy in a New Keynesian model with unemployment and financial frictions where banks produce loans using equity as collateral. Firms and households demand loans to finance externally a fraction of their flows of expenditures. Our findings show amplifying business-cycle effects of a more rigid loan production technology. In the monetary policy analysis, the optimal rule clearly outperforms a Taylor-type rule. The optimized interest-rate response to the external finance premium turns significantly negative when either banking rigidities are high or when financial shocks are the only source of business cycle fluctuations.