Leper colonies and lazarettos were established as a means of preventing the spread of leprosy and other contagious diseases through social distancing, until transmission was understood and effective treatments invented.