Manhattan transformed from a small town in the 19th century to a large, prosperous city due to growing immigration and industrialization. The opening of the Erie Canal contributed to population growth. As the city expanded, it developed infrastructure like fire stations, police departments, and shops. By the Civil War, New York City had become the largest commercial center in the U.S. However, the growing population also led to problems like lack of green space, discrimination against immigrants from Ireland and Africa, and political corruption by bosses like William Tweed.