This paper offers a comprehensive analysis of the implications for financial stability of a central bank issuing a digital currency to the public at large. We start with a systematic analysis of balance sheet changes that arise from the new liability for the central bank and the banking system, and examine how they depend on preconditions, central bank choices, and banking system responses. Based on this, we discuss the range of implications for financial stability that may arise in steady state, in the context of adoption, and in crisis times. Threats to financial intermediation in steady state arise mainly in situations where the central bank balance sheet expands, and triggers adjustment mechanisms that lead to more costly or less stable funding of the banking system, while in crisis times run risk may increase. Our analysis of policy choices to control these effects considers macroprudential policy, and an expansion of central bank lending to commercial banks, but finds that a main contribution needs to come from a design of the CBDC that encourages its use as a means of payment rather than a store of value.