The aim of the paper is to investigate the relationship between competition and risk-taking in the banking industry. The paper provides a general theoretical model that incorporates the charter value models and models with contracting problems. In particular, the model contains a moral hazard problem and it enables investments into the risk-free asset. Competition on the loan side of the market is modeled as spatial competition. The model predicts that the relationship between competition and the probability of bank failure is non-monotonic and U shaped. The prediction of the model is verified by the empirical analysis conducted using the data from Czech banking sector. The HerfindahlHirschman index is used as a measurement of competition and the Z-score is used as measurement of the probability of bank failure.