By the middle of the 18th century Havana had more than seventy thousand inhabitants, and was the third-largest city in the Americas, ranking behind Lima and Mexico City but ahead of Boston and New York.