The SARS-CoV-2 nucleocapsid (N) protein binds the viral RNA genome and contains two ordered domains flanked by three intrinsically-disordered regions. Here, the authors show that RNA binding induces liquid-liquid phase separation of N, which is driven by its central intrinsically-disordered region and is modulated by phosphorylation. The SARS-CoV-2 Membrane (M) protein also phase-separates with N, and three-component mixtures of N + M + RNA form mutually exclusive compartments containing N + M or N + RNA.