The New York City metropolitan area was the most highly-funded region of the US in the third quarter of 2017 -- pushing San Francisco out of its long-held spot.

Startups in NYC saw $4.227 billion in funding during the third quarter of 2017, up from $2.689 billion in the second quarter.

Funding in San Francisco/North Bay Area was flat from last quarter, with $4.177 billion invested in local startups.

New York City has surpassed San Francisco as the region whose startups attract the most venture capital money, thanks in large part to a mega-round of funding scooped up by co-working company WeWork.

VCs invested $4.227 billion in NYC companies over the third quarter of 2017, compared to $4.177 billion in funding for companies in San Francisco and the North Bay Area. These numbers come from the recently released Q3 2017 MoneyTree Report from PwC and CB Insights.

While San Francisco's funding was flat from the previous before, NYC's numbers were up considerably from $2.689 billion in funding during Q2. The spike was due to the enormous $2.5 billion in funding garnered by the NYC-base coworking space company WeWork.

Barring another massive Big Apple round of startup investments, San Francisco will probably regain the top spot by the end of the year.

San Francisco, home to Uber, Twitter and numerous other big tech names, has long dominated the startup funding rankings. But it's worth nothing that Silicon Valley -- the venture capital and tech hub just south of San Francisco -- is calculated as a separate region in the MoneyTree report.

Silicon Valley companies saw $2.2 billion in funding for the third quarter -- a big dip from $4.1 billion in the quarter prior.