|This article needs more links to other articles to help connect it. Please help improve this article by adding links that are relevant to the context within the existing text.|
New York was briefly (1789–90) the U.S. capital and was state capital until 1797. By 1790 it was the largest U.S. city, and the opening (1825) of the Erie Canal, linking New York with the Great Lakes, led to even greater expansion.
In 1898 a new charter was adopted, making the city Greater New York, a metropolis of five boroughs: Manhattan, Queens, the Bronx, Brooklyn and Staten Island. Massive immigration, mainly from Europe, swelled the city's population in the late 19th and early 20th cent. After World War II, many African Americans from the South, Puerto Ricans, and Latin Americans migrated to the city in search of jobs.
Same-sex marriage in the U.S. state of New York became legal on July 24, 2011, under the Marriage Equality Act, which was passed by the New York State Legislature on June 24, 2011 and signed by Governor Andrew Cuomo on the same day.