Oct 18(Reuters) - A number of U.S. banks saw continued pain in the third quarter on delinquent commercial real estate (CRE) loans in their portfolios, as stress in the sector persists.

Building owners that borrowed money to finance their properties are being squeezed by high interest rates and vacant offices as workers opt to work from home. Weak demand for offices could trigger a wave of borrowers to default on their loans and put pressure on banks and other lenders, which are hoping to avoid selling loans at significant discounts.

As a result, banks recorded continued provisions for credit losses and charge-offs from the previous quarter, driven by their non-performing (NPL), or delinquent, CRE loans.

"This is going to go on for at least a year, where NPLs continue to rise, followed by charge-offs - it's going to be really ugly," said Rebel Cole, a finance professor at Florida Atlantic University.

I'm sure that banks are trying to avoid selling their worst properties because that's going to force them to take a larger write-off, and because every property that's sold becomes a comparable sale for the appraisers that value the properties. "

In its third quarter earnings release, Morgan Stanley noted it set aside $134 million for credit losses. Similar to the $161 million it set aside in the second quarter, the bank noted this was due to "deteriorating conditions in the commercial real estate sector."

Other banks' earnings in the past week showed similar challenges facing CRE holdings. On Tuesday, Goldman Sachs disclosed that it had reduced its exposure to office-related CRE holdings by roughly 50% this year.

Bank of America on Tuesday reported its non-performing loans, or those with at least 90 days of payments past due, increased to nearly $5 billion in the third quarter from $4.27 billion in the second quarter, due largely to its CRE portfolio.

Borrowers have struggled to refinance their CRE loans as property values have declined and interest costs have risen. Some $20 billion of office commercial mortgage-backed securities, which bundle together individual loans, mature in 2023, according to real estate data provider Trepp.

Regulators have kept a close eye on banks' CRE risk. While bigger banks such as JPMorgan and Goldman Sachs have relatively less exposure to CRE, smaller regional banks have greater exposure that have posed challenges, according to research from JPMorgan and Citigroup.

Small banks hold 4.4 times more exposure to CRE loans than their larger peers, JPMorgan found earlier this year. Citigroup found that regional or smaller lenders hold 70% of CRE loans.

"A lot of these big banks benefit from all of these different business lines," said Mayra Rodriguez Valladares, a bank and capital markets risk consultant. "Whereas once you start being regional and once you start being a community bank, there isn’t all of that business diversity."

Wells Fargo saw an increase in net charge-offs on its CRE portfolio compared to previous quarters. On Oct. 13, the bank reported $93 million in net CRE loan charge-offs, compared with $79 million in the second quarter and $17 million in the first.

In addition, the bank's allowance for credit losses increased $333 million in the third quarter driven primarily by CRE. It saw a $1.3 billion increase in its office CRE nonaccrual loans.

On Oct. 13, PNC reported its non-performing CRE loan balance more than doubled to $723 million in the third quarter from $350 million in the second quarter.

"While overall credit quality remains strong across our portfolio, the pressures we anticipated within the commercial real estate office sector have begun to materialize," PNC Chief Financial Officer Robert Reilly told analysts. (Reporting by Matt Tracy; Editing by Lananh Nguyen and Jonathan Oatis)