Severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) causes a respiratory disease called coronavirus disease 2019 (COVID-19), the spread of which has led to a pandemic. An effective preventive vaccine against this virus is urgently needed. As an essential step during infection, SARS-CoV-2 uses the receptor-binding domain (RBD) of the spike protein to engage with the receptor angiotensin-converting enzyme 2 (ACE2) on host cells1,2. Here we show that a recombinant vaccine that comprises residues 319-545 of the RBD of the spike protein induces a potent functional antibody response in immunized mice, rabbits and non-human primates (Macaca mulatta) as early as 7 or 14 days after the injection of a single vaccine dose. The sera from the immunized animals blocked the binding of the RBD to ACE2, which is expressed on the cell surface, and neutralized infection with a SARS-CoV-2 pseudovirus and live SARS-CoV-2 in vitro. Notably, vaccination also provided protection in non-human primates to an in vivo challenge with SARS-CoV-2. We found increased levels of RBD-specific antibodies in the sera of patients with COVID-19. We show that several immune pathways and CD4 T lymphocytes are involved in the induction of the vaccine antibody response. Our findings highlight the importance of the RBD domain in the design of SARS-CoV-2 vaccines and provide a rationale for the development of a protective vaccine through the induction of antibodies against the RBD domain.