A huge chunk of downtown office space is under new ownership after being threatened with foreclosure.

The keys to the three-building, 986,000-square-foot James Center complex were handed over last week to GMACC 2006 C1 East Cary Street LLC, the noteholder of the properties that had previously scheduled to foreclose on the trio of towers at 901, 1021 and 1051 E. Cary St.

No money changed hands in the process, according to city records, and the deal was done by transferring the deed in lieu of foreclosure. It allowed the previous owner, New York-based JEMB Realty, to dodge a foreclosure auction that had been scheduled earlier this month.

JEMB in January defaulted on two loans on the properties totaling $150 million. The loans were part of a pool of commercial mortgage-backed securities. CWCapital was the original lender on the notes in 2005, when the complex was purchased by JEMB for $184.49 million, city records show.

Joseph Jerome, president for JEMB Realty, would not comment for this story.

LNR Partners, a special servicer on big commercial mortgages, is now working on behalf of the new owner, according to city records.

Jason Chudoba, a spokesperson for LNR, said the firm would not comment.

There are 331,000 square feet of space available at James Center between the three buildings, which accounts for about a third of the total space. The complex’s troubles were spurred by the loss of law firm McGuireWoods, which had anchored One James Center until its move in 2013 to downtown’s newest tower, Gateway Plaza.

Colliers International handles leasing for James Center through brokers Austin Newman, Andrew Ferguson and Christopher Wallace.

Newman declined to comment on the new owner’s plans for the properties.

The complex was most recently assessed by the city at $147.39 million.

The change in ownership follows a wave of downtown office tower sales in recent months, by which the Williams Mullen building, Riverfront Plaza and the Bank of America building all found new owners.