Amazon’s search for a city to host its second North American headquarters (aka HQ2) is now over, after hundreds of submissions, lots of speculation, and over-the-top efforts by cities to woo the company’s billionaire founder, Jeff Bezos.

And in the end, two major metropolitan areas—New York City and Washington, D.C.—won out, with the tech giant announcing today that it will split HQ2 between Long Island City in Queens, and Crystal City in northern Virginia. In Queens, this means a headquarters of at least 4 million square feet, which could bring as many as 25,000 employees to the neighborhood.

“These two locations will allow us to attract world-class talent that will help us to continue inventing for customers for years to come,” Bezos said in a statement. “The team did a great job selecting these sites, and we look forward to becoming an even bigger part of these communities.”

That Queens neighborhood was one of four pitched as a potential location for HQ2 in NYC, along with the Financial District, Midtown West, and the “Brooklyn Tech Triangle” (encompassing Downtown Brooklyn, Dumbo, and the Navy Yard). Ultimately, Amazon selected Long Island City—after a concerted effort by Gov. Andrew “Amazon” Cuomo—because of its proximity to Manhattan, its mass transit options, and its reputation as a “diverse community” with lots of mixed-use buildings.

In the announcement, Mayor Bill de Blasio said he was “thrilled” that Amazon has picked LIC, and that the move is “is a giant step on our path to building an economy in New York City that leaves no one behind.”

Amazon’s announcement also outlines some of the subsidies that state has promised the tech giant—to the tune of around $1.7 billion—which had thus far been unclear. Those include:

$1.525 billion in “performance-based direct incentives,” including $1.2 billion based on a percentage from future Amazon workers’ salaries

$325 million from Empire State Development based on its locating to Long Island City

An undisclosed amount that could come from the city’s New York City’s Industrial & Commercial Abatement Program (ICAP) and New York City’s Relocation and Employment Assistance Program (REAP)

Per numbers @NYGovCuomo just gave, Amazon likely to get $897 million from city REAP program and $386m from ICAP, on top of $1.5B+ from state. So total $2.8 billion in city and state subsidies. — Erin Durkin (@erinmdurkin) November 13, 2018

In exchange, Amazon has promised to build a new school in Long Island City and a tech incubator on its campus, as well as unspecified “infrastructure improvements and new green spaces.” Amazon has also agreed to participate in the city’s Payment In Lieu Of Tax (PILOT) program, which funnels money back into the community based on the company’s property taxes. (The program is famously in use at Brooklyn Bridge Park, with the private housing there funding park operations and maintenance.)

According to the agreement, the total cost of building a new LIC HQ would be nearly $3.7 billion. Amazon has also settled on a development site in Long Island City: It will build its new HQ on several public and private sites (including one owned by Plaxall Realty) around Anable Basin on the East River waterfront, as had previously been speculated.

A spokesperson for Plaxall provided Curbed with a statement from the company that touts the neighborhood “as a center of productivity, innovation, and artistic creativity.”

“We have seen firsthand in Seattle how the company has worked to develop and integrate its campus and employees into the surrounding community, and we know Amazon intends to execute a similar vision here,” the statement continues. “It’s therefore meaningful for us, as a family, to be able to work closely with Amazon on a plan for Anable Basin that honors the character of LIC and stays true to the same vision of innovation and productivity that drew our grandfather, Louis Pfohl, here seven decades ago, and was furthered by his children, Ann, Jim and Lynn.”

In addition, Amazon will also lease 1.4 million square feet of space at One Court Square, otherwise known as the Citigroup Building. Citigroup was rumored to move most of its business out of the building by 2020 to make room for Amazon, and the Commercial Observer has now confirmed that development.

What this decision means for NYC at the moment is unclear. Even at half the size that HQ2 was previously pitched as, this new LIC-based headquarters will radically reshape not only the neighborhood it calls home, but the city at large. The company says its new headquarters could create as many as 25,000, along with billions of dollars of investment. Even with Amazon’s promised investments, it’s likely that the influx of workers will drive up the cost of housing and further strain the city’s already crumbling transit systems.