The city grew rapidly throughout the first half of the 19th century, serving as an entry point and more often than not eventual home for millions of foreign immigrants. It quickly became a bustling metropolis that served not only as a financial center but also a leader in the fields of manufacturing and industry. It remained unscathed during the first American Civil War (although thousands of its denizens died fighting in the conflict) and, along with other Northern cities, ended up swelling with black refugees from the Confederacy. More European immigrants arrived throughout the second half of the century and New York was by far the largest city in the United States by the time the five boroughs were consolidated into a single city in 1898.
The city unveiled its famous subway system in 1904 and continued to grow and change throughout the next few decades. Large skyscrapers became ubiquitous throughout the city between 1900 and 1940, and several bridges and tunnels connecting the city's boroughs as well as New Jersey were constructed to make travel easier throughout the area. New York was named provisional capital of the United States following the occupation of Washington, D.C. by Confederate forces in 1941. The change was made permanent following the end of the war as Washington suffered extensive damage after changing hands several times and playing host to several grueling battles, eventually becoming abandoned. Lower Manhattan was shelled in late 1945 by the German Navy and suffered minor damage, the most serious and infamous such incident involving a daring U-Boat attack on Christmas Eve of that year that destroyed the city's Customs House and killed 27 people.
Following the war, New York gradually slid into crime and decay along with the rest of the United States. Millions of impoverished Americans abandoned destitute smaller cities and rural areas and flooded the city, which was one of the last places in America where job opportunities still existed. Crime, poverty, and homelessness skyrocketed while new construction largely came to a halt, leaving the city in a state of perpetual disrepair throughout the 1960s and 70s. Conditions became so bad that Democratic president Richard Nixon abandoned the presidential residence at Gracie Mansion in 1970 and instead tended to the affairs of the government from a manor in nearby Connecticut, although his Socialist successor Edmund Muskie returned the office of the president to New York as a symbol of good faith following his inaugaration in 1973.
The city experienced something of a renaissance during the 1980s, as it became a hub of activity and innovation during America' tech boom. The city used its massive influx of cash from the boom to help rein in the rampant crime and poverty that had plagued the city for decades, and while both remain at high levels New York has returned to its former status as a world-class city. The city's skyline, having remained largely unchanged for nearly five decades due to lack of construction, is today teeming with activity as new gleaming towers rise above their weathered 1930s counterparts.
The city boasts the most extensive metro system in the Americas and the largest outside of the Greater German Reich or the Empire of Japan, although it is far dirtier and more dangerous than its immaculate and heavily-policed rivals in Berlin and Tokyo. The city is a center of art and culture, serving as home to myriad museums, galleries, and theatres with Broadway being the nation's mecca of live entertainment. New York is also home to several successful professional sports franchises such as the New York Yankees, the famed often-champion baseball club, as well as the Queens Dodgers, their far less renown crosstown rivals.