In a quarter that saw a rout in global stocks, commodities and major currencies, at least one investment stayed hot: Manhattan apartments.

Sales of condominiums and co-ops in the borough jumped 9.8 percent in the third quarter, the first annual increase in a year, according to appraiser Miller Samuel Inc. and brokerage Douglas Elliman. The average price per square foot hit a record $1,497, while the median price paid climbed 9.9 percent from the same time in 2014, to $998,000.

By contrast, the average price per square foot for all condos sold in the Twin Cities last month was $159; for new condos, $299.

Manhattan real estate buyers are facing a shortage of inventory, particularly for homes priced at less than $1 million. That's propping up prices, fueling competition and increasing the number of commitments made entirely in cash. Apartments that sold in the third quarter spent an average of 73 days on the market, the shortest time in Miller Samuel data dating to 1996.

"When you have inventory unable to keep up with demand, you're going to have more bidding wars," said Jonathan Miller, president of Miller Samuel. "We have a tight housing market, and it should be no surprise that we're going to see prices at or near records each quarter."

The data are based on completed sales, which means that prices and terms of those deals were largely agreed to in June and July, before China's currency devaluation in August roiled global markets and accelerated stock selling.

Whether broader turmoil dims overseas interest in Manhattan real estate can't yet be measured, and it may ultimately bolster demand as buyers seek safe-haven investments. On New York property-listing website StreetEasy, page views originating from China more than doubled in July from a year earlier, according to Alan Lightfeldt, a data scientist with the site. That was the same month that China's security regulator banned major shareholders from selling stakes in listed companies for half a year.

Manhattan real estate "isn't a stock market, where China and the Federal Reserve spook investors and you see this big rapid decline," said Gregory Heym, chief economist for Terra Holdings, which owns brokerages Halstead Property and Brown Harris Stevens.

"Until supply changes I don't see much of a change in the market," Heym said.