Buffalo is the second most populous city in the state of New York, after New York City. Located in Western New York on the eastern shores of Lake Erie and at the head of the Niagara River across from Fort Erie, Ontario, Buffalo is the seat of Erie County and the principal city of the Buffalo-Niagara Falls metropolitan area, the largest in Upstate New York. Downtown Buffalo is located 17 miles (27 km) south of Niagara Falls and 103 miles (165 km) southeast of the Canadian city of Toronto. The city lies adjacent to the rapidly growing Golden Horseshoe region of Southern Ontario, which has a population of more than 8 million. Buffalo itself has a population of 270,919 (July 1, 2009 Estimate), and the Buffalo–Niagara–Cattaraugus Combined Statistical Area is home to 1,203,997 residents.