Buffalo is the second-largest city in the U.S. state of New York (after New York City) and the seat of Erie County. It lies in Western New York, at the eastern end of Lake Erie, at the head of the Niagara River, on the United States border with Canada. With a population of 278,349 according to the 2020 census, Buffalo is the 78th-largest city in the United States. Buffalo and the city of Niagara Falls together make up the two-county Buffalo–Niagara Falls Metropolitan Statistical Area (MSA), which had an estimated population of 1.1 million in 2020, making it the 49th largest MSA in the United States.
Before the 17th century, the region was inhabited by nomadic Paleo-Indians who were succeeded by the Neutral, Erie, and Iroquois nations. In the early 17th century, the French began to explore the region. In the 18th century, Iroquois land surrounding Buffalo Creek was ceded through the Holland Land Purchase, and a small village was established at its headwaters. In 1825, after its harbor