The central bank as the Lender of Last Resort (LLR) is faced with a trade off between the stability of the financial system and the moral hazard of banks. In this paper we explore how this trade off was dealt with by the Bank of Japan (BOJ) in the pre-war period, and how LLR lending by the BOJ affected the financial system. In providing an LLR loan, the BOJ adopted the policy of favoring banks which already had a transaction relationship with the BOJ. Meanwhile, the BOJ was selective in having transaction relationship with banks, and it ceased the relationship, in case the performance of a transaction counterpart declined. The analysis of the bank exits data suggests that the BOJ could successfully bail out illiquid but solvent banks, and thereby avoided the moral hazard that the LLR policy might otherwise have incurred.