This paper explores how the legal environment affects bank behavior in 20 transition economies. Based on a newly constructed data set we find that banks’ loan portfolio composition depends on the legal environment. If banks operate in a well-functioning legal environment they lend relatively more to SMEs and provide more mortgages. On the other hand, banks lend more to large enterprises and to the government if the legal system is unsound. As a transmission channel we identify the banks’ willingness to accept collateral which depends on the bankers’ perceptions of the prevailing laws regarding collateral.