Compared to the 1970s, the 1980s were a time of restrained optimism in New York. The boom on Wall Street was fueling the speculative real estate market, and unemployment numbers dropped noticeably, however, the city's reputation for crime and disorder was still very much a part of New Yorkers' daily lives. Mayor Ed Koch repeatedly warned that filth, crime, and racial tensions were weakening the city. He put a high priority on rebuilding neighborhoods and infrastructure. One result was that gentrification brought new businesses to decrepit neighborhoods corners and converted low-end rental housing to co-ops and condos that attracted young upscale professionals and business people. Koch's energetic efforts brought enormous attention from the media, but critics condemned his attacks on his opponents as "crazy," "wackos," and "radicals" and alleged he was racially divisive.
For years enormous attention followed the criminal trials resulted when a woman known as the Central Park Jogger was badly beaten and raped. The illegal drug trade flourished, causing the murder rate to soar, and dividing the city into areas ruled by different drug lords. It became known as the crack epidemic. The New York City Subway fell victim to a crime epidemic that saw more crimes being committed on the subway each year than in any other subway system around the world.
Homelessness became a serious problem during the 1980s, specifically in the last two of Edward Koch's three terms as mayor (1978–1990). The city outlawed discrimination against gay and lesbian people in such matters as employment and housing in 1986. In 1989, Koch was defeated by David Dinkins in the Democratic Party primary in his bid for a fourth term, and then Dinkins narrowly defeated Republican Rudolph Giuliani in the general election to become the city's first-ever black mayor. Crime began a 15-year decline in 1990 during Dinkins's administration, but a combination of continued racial strife (such as that in the Crown Heights Riot in 1991), and an extremely weak economy (in January 1993 the city's unemployment rate reached 13.4 percent, the highest level of joblessness seen there since the Great Depression). This caused Dinkins' popularity to seriously decline (including a threat by residents of Staten Island to secede from the city, where in a 1993 referendum, 65% voted to secede, but implementation was blocked in the State Assembly).
On February 26, 1993, a truck bomb detonated in a basement garage of World Trade Center Tower One. The 1,336 pounds (606 kg) urea nitrate–hydrogen gas enhanced device was intended to knock the North Tower (Tower One) into the South Tower (Tower Two), bringing both towers down and killing tens of thousands of people. It failed to do so, but did kill six people and injured more than a thousand.
In late 1993, David Dinkins was defeated by Rudolph Giuliani in his bid for reelection.
The city rebounded in the mid- and late 1990s due to the steady expansion of the national economy and the Wall Street stock market boom that took place concomitantly, as well as the precipitous drop in crime, although stubbornly high unemployment remained a local problem. Mayor Rudolph Giuliani, a former federal prosecutor, is credited by many for revitalizing Times Square and making the city more "liveable" by cracking down on crime. Changes in the worldwide economy during this time proved to be especially favorable to New York because of its highly developed transportation and communications infrastructure, as well as its massive population base. Over the course of the decade, the city's image transformed from being one of a bygone, decaying metropolis to one of the world's preeminent "global cities."
As for sports, 1994 saw a great chapter in the city's sports history, with the New York Rangers finally winning their first Stanley Cup since 1940 and the New York Knicks making it to the NBA Finals, where they lost in seven games to the Houston Rockets, at the same time.
The Knicks made it to the NBA Finals again in 1999, where they lost in five games to the San Antonio Spurs. The New York Yankees began a dynasty led by manager (and New Yorker) Joe Torre winning the World Series in 1996, 1998, 1999, and 2000.
On September 11, 2001, hijackers linked to the jihadist organization Al-Qaeda piloted two airliners into each of the World Trade Center towers. The airplanes, designated for transcontinental flights and therefore fully loaded with jet fuel, crashed into the towers in the early morning hours of September 11. The crashes ripped gaping holes into the towers, and ignited fires that caused the towers to collapse. Together with a simultaneous attack on the Pentagon in Arlington, Virginia, and a failed plane hijacking that resulted in a plane crash in Shanksville, Pennsylvania, 2,977 victims died in the attacks; the 9/11 attacks led to a temporary exodus of business from Lower Manhattan to places such as Midtown Manhattan, Jersey City, and Brooklyn, as well as elsewhere, along with the need to reposition the broadcasting antennas of several television channels. About 430,000 job-months and $2.8 billion in wages were lost in the three months after the attacks. The economic effects were mainly on the economy's export sectors. The city's GDP was estimated to have declined by $27.3 billion for the last three months of 2001 and all of 2002. The U.S. government provided $11.2 billion in immediate assistance to the Government of New York City in September 2001, and $10.5 billion in early 2002 for economic development and infrastructure needs. Hundreds of thousands of tons of toxic debris containing more than 2,500 contaminants, including known carcinogens, were spread across Lower Manhattan due to the collapse of the Twin Towers. Exposure to the toxins in the debris is alleged to have contributed to fatal or debilitating illnesses among people who were at ground zero. The Bush administration ordered the Environmental Protection Agency (EPA) to issue reassuring statements regarding air quality in the aftermath of the attacks, citing national security, but the EPA did not determine that air quality had returned to pre-September 11 levels until June 2002. Many other closings, evacuations, and cancellations followed the attack, either out of fear of further attacks or respect for the tragedy. Cleanup of the World Trade Center site was completed by the end of May 2002.
On November 12, 2001, American Airlines Flight 587 crashed into the Belle Harbor neighborhood of Queens, killing all 260 people on board and five others on the ground. It was the second-deadliest aviation incident involving an Airbus A300, after Iran Air Flight 655 and the second-deadliest aviation incident to occur on U.S. soil, after American Airlines Flight 191. In terms of single-airplane crash incidents that were ruled accidental and not criminal, as of March 2014, no incident since then has surpassed that death toll, though before 2001 there had been deadlier incidents of this type. Although initially feared to be another act of terrorism, the crash was eventually found to have been caused by pilot error.
New York City was affected by the 2003 North America blackout on August 14, 2003, at 4:11 PM, leaving the city without electricity for over a day. Unlike in the New York City blackout of 1977, there was no major looting. However, during the blackout, Verizon's emergency generators failed several times, leaving the emergency services number 9-1-1 out of service for several periods of about a quarter-hour each. New York City's 311 information hotline received over 175,000 calls from concerned residents during the weekend. Amateur radio operators attached to New York City ARES provided a backup communications link to emergency shelters and hospitals. Amateur radio repeaters were supplied with emergency power and remained functional. Many major U.S. networks (CBS, NBC, ABC, and FOX) and some cable TV networks (such as HBO, MTV, and Nickelodeon) were unable to broadcast because of the lack of electricity in the New York City area, but back-up stations in Dallas and flagship transmitters there made it possible for prime-time television to be broadcast. (ABC chose instead to cover the news from Washington, D.C. during the blackout).
Hurricane Irene brought a destructive storm surge to New York City on the evening of August 24–25, 2011. In Manhattan, the Hudson River flooded in the Meatpacking District. Long Beach and Freeport, both of which experienced serious flooding, were among the worst-hit towns on Long Island, and many roads were left impassable. The workers at Ground Zero in Lower Manhattan worked to make the World Trade Center site hurricane-proof, and escaped major damage, just missing the tenth anniversary of 9/11. The winds knocked down many trees and power lines, leaving almost 350,000 homes and businesses without power in Nassau and Suffolk counties.
Hurricane Sandy brought another destructive storm surge to New York City on the evening of October 29, 2012, flooding numerous streets, tunnels and subway lines in Lower Manhattan and other areas of the city and cutting off electricity in many parts of the city and its suburbs. City public schools closed for four days. CUNY and NYU canceled all classes and campus activities for October 30. The New York Stock Exchange was closed for trading for two days, the first weather closure of the exchange since 1985. It was also the first two-day weather closure since the Great Blizzard of 1888. The East River overflowed its banks, flooding large sections of Lower Manhattan. Battery Park had a water surge of 13.88 ft. Seven subway tunnels under the East River were flooded. The Metropolitan Transportation Authority said that the destruction caused by the storm was the worst disaster in the 108-year history of the New York City subway system. Sea water flooded the Ground Zero construction site. Over 10 billion gallons of raw and partially treated sewage were released by the storm, 94% of which went into waters in and around New York and New Jersey. In addition, a four-story Chelsea building's facade crumbled and collapsed, leaving the interior on full display; however, no one was hurt by the falling masonry.
Billionaire media baron Michael Bloomberg, a Republican, was elected mayor in 2001, and reelected in 2005 and 2009. He used a statistical, results-based approach to city management, appointing city commissioners based on their expertise and granting them wide autonomy in their decision-making. Breaking with 190 years of tradition, he implemented what New York Times political reporter Adam Nagourney called a "bullpen" open office plan, similar to a Wall Street trading floor, in which dozens of aides and managerial staff are seated together in a large chamber. The design is intended to promote accountability and accessibility.
Over the next ten years, a wave of public- and private-sector building projects reshaped large sections of the city, and a residential construction boom has resulted in permits being issued for over 25,000 new residential units every year. While the 2012 Summer Olympics ultimately went to London, New York was among the finalists and the campaign resulted in a plan to replace Shea Stadium with a new stadium, as well as an extension of the 7 subway service.