Malls in smaller cities have been suffering for years from store closures as retailers adjust their store footprints to changing consumption habits and rising online sales.

Now retail rents in some of the priciest cities in the U.S. are falling back to earth after years of strong growth, as the retail reckoning spreads to properties once considered immune.

Over the past 12 months, rents in New York, Washington and Boston declined between 0.4% and 1.4%, while rents were roughly flat in Chicago and San Francisco, according to data from CoStar Group,CSGP -1.00% a commercial real estate data provider. Across the U.S., rent growth averaged 1.8% in 2017, down from 2.7% in 2016 and the slowest pace since 2012.

The availability rate across all retail property types, including enclosed malls, open-air malls, grocery-anchored centers and strip centers, rose to 6.6% in the fourth quarter of 2017, up from 6.1% a year earlier, according to CBRE Econometric Advisors. Availability rates include both vacant space and spaces that are currently occupied but are marketed to potential tenants because they will be vacant soon.

“We’re seeing downward pressure on rents,” said James Hull, founder and managing principal of Hull Property, a retail real estate company based in Augusta, Ga. “Some of that comes from too much space and too few tenants.”

Hull Property, which owns about 15 million square feet of retail space in 13 states, said some tenants are more cautious these days, opting to sign leases of three years versus the previous norm of five to 10 years. Mr. Hull added that, depending on location and availability of space, his firm sees rent increases in about 20%-30% of lease renewals signed.

A surge in the number of bankruptcy filings and store closures announced by apparel retailers and department stores has hung over the sector, particularly second-tier malls in less affluent areas. While discount retailers and grocers such as Dollar GeneralCorp. , TJXCo s.,Five BelowInc. and Lidl are still opening stores, they are focused mainly in standalone retail centers and open-air centers rather than enclosed malls, according to research firm Fung Global Retail & Technology.

Meanwhile, some downtown areas that experienced skyrocketing rents a few years ago are now showing significant weakness.

The substantial number of empty storefronts in New York City, for example, finally has taken a toll on landlords, who are starting to adjust their prices accordingly. CBRE said average asking rents in Manhattan plunged 18% to $721 a square foot in 2017 from 2016. Manhattan’s retail real estate market, which is more affected by tourism than that of other cities, is subject to volatile swings. Average asking rents peaked in the fourth quarter of 2014, exceeding $1,000 a square foot.

SL Green RealtyCorp.SLG -0.28% , a big office building owner in New York City, said rent negotiations for retail space at its 719 Seventh Ave. building in Times Square would take some time.

“We acknowledge it was more of a challenge than we expected,” said Marc Holliday, chief executive officer at SL Green during the company’s fourth-quarter earnings call last week. “We’re still in sort of a discovery phase in terms of the market, block by block.”

Some pockets of the country remain strong. Asking rents in Nashville, Orlando, Atlanta, Dallas-Fort Worth and Denver rose by 5.1% to 7.3% over the last 12 months, while in Los Angeles and Miami, rents rose 2.3% and 2.8% respectively, according to CoStar.

Retailers are becoming more selective in where they open new stores or sign renewals, and in affluent, high-density locations, landlords say they are still able to command higher rents.

“Retailers are disproportionately targeting their less-productive locations for closure, while demand for strong locations remains robust and unmet by new supply,” said CoStar in a report.

Tom McGee, president and chief executive officer at International Council of Shopping Centers, said the industry is in a good position with regard to supply, noting that the millennial population will be aging into its prime consumption years while the modest growth in new shopping center development in the past 10 years could keep market fundamentals balanced.

Also tipping in landlords’ favor this year is the tax overhaul, which promises significant savings for retailers, a group that has paid among the highest effective tax rates over the years.

“It will provide some with a little extra cash cushion that may lessen the urgency to strategically close stores where the financials may still make sense, such as a store with flat sales or even ones that are just modestly losing money where leases are going to end anyway in the next 18 months,” said Garrick Brown, vice president and head of retail research at property consultancy Cushman and Wakefield.