Shimbara was one of the three districts known as established in the major cities of Japan by the Tokugawa shogunate to restrict prostitution to designated districts. These districts were Shimabara in Kyoto (est. 1640), Shinmachi in Ōsaka (est. 1624–1644) and Yoshiwara in Edo (est. 1617). These restrictions and controls were designed to control the widespread male and female prostitution of the Edo period (1603–1868). They did not derive from a moral opposition to prostitution but out of a desire to compartmentalize certain types of activity within the cities. Kabuki and jōruri theatres, and other related entertainment establishments were similarly controlled. When geisha subsequently developed in the mid-1700s, some operated in Shimabara, and hence it also became a hanamachi (geisha district).