The larger part of New York, north and northwest of the metropolitan area, is called "Upstate New York". Cities in this part of New York include Buffalo, the state's second largest city, Rochester, Syracuse, and the state capital of Albany. These places became cities because of the Erie Canal. Between 1788 and 1797, the Legislature moved the state capital around between Albany, Kingston, Poughkeepsie, and New York City. Albany became the permanent capital from 1797.