An understanding of transmission patterns and the ability to diagnose and confirm affected patients ultimately led to effective containment measures and a slowdown in the spread of the disease.