FRANKFURT, Nov 30 (Reuters) - A debt crunch at Swedish property group SBB has left the European Central Bank at risk of losses and highlighted the 26 billion euro ($29 billion) exposure it built up to Europe's now stricken real estate sector through its crisis-era bond buying.

A Reuters analysis of ECB records shows that it owns two euro-denominated bonds issued by SBB, which racked up debts of more than $9 billion buying property, including social housing, government offices, schools and hospitals.

Two sources familiar with the matter said that the ECB's SBB bond holdings totalled a few hundred million euros. One SBB bond is now trading at roughly half its face value, showing investors were pricing in some risk of an eventual debt default.

When SBB, which is now junk-rated, recently bought back bonds at a small discount to stabilise its finances, the ECB was among the sellers, one person familiar with the matter said.

An ECB spokesperson declined to comment on SBB or any losses incurred, pointing to its website where the central bank characterises its losses in general as "side effects" and says it can dip into large profits of recent years to offset them.

Although SBB represents a small exposure for the ECB, it is re-opening a debate about how the euro zone central bank has splashed nearly 400 billion euros on company debt since 2016 as part of huge asset purchases to avert the threat of deflation.

In total, it spent around 5 trillion euros on government debt, company bonds and other assets, which it usually holds until maturity.

Yet as far back as 2016, the ECB warned of a property bubble in parts of Europe, while at the same time buying bonds in real estate companies in the region under the scheme.

"It is hard to understand how the ECB ended up buying the bonds of property companies, while at the same time warning of the risks of property price inflation," former ECB chief economist Otmar Issing told Reuters.

"It contributes to inflating the bubble, while risking its reputation as well as financial losses," he added.

As well as the SBB bonds, the ECB holds debt in other property companies across Europe, including in Germany and Sweden, the countries worst hit after the steepest interest rate hikes in the euro's history pricked real estate bubbles which had been inflated by a decade of almost free money.

SBB's troubles have been known since early 2022, when it was targeted in a critical report by short-seller Viceroy Research.

"They (the ECB) should have applied ... active risk management," said Daniel Gros, director of the Institute for European Policymaking at Bocconi University in Milan.

While the ECB outlines the parameters of its bond buying, it does not say how much it bought, at what price or detail any losses. But data this week shows the central bank still owned the two bonds issued by SBB as of Nov. 24.

In the event of an SBB default, the euro zone's 20 national central banks, which share the risk for company bonds bought on the ECB's behalf under its Corporate Sector Purchase Programme, would have to take a small loss if it still owned the debt, which it bought in mid-2021 and early 2022.

"SBB needs to decrease its debt further but has taken significant steps ... having repaid 2 billion euros in debt in the last 15 months," a company spokesperson said.

BUYING 'BLIND'

Borrowers from Europe and beyond tapped into the ECB scheme, under which any company, bar banks, qualified so long as its debt was in euros and issued by a euro zone entity with an "investment grade" rating by a major agency.

"The purpose was to lower borrowing costs in the euro area and you don't do that by buying the bonds of a Swedish company," said Gros, adding that the ECB had "blindly" followed its rules, without taking proper precautions.

While Sweden is not in the euro zone, SBB issued the debt bought by the ECB in neighbouring Finland, which is.

Alongside the SBB bonds, the ECB also hoovered up the debt of other property companies which have since hit problems, including Sweden's Heimstaden.

Both were downgraded in recent months by Fitch Ratings, which said they were among a handful of European property firms facing "debt maturity walls" in the next 12 to 18 months.

The ECB owns eight Heimstaden bonds, issued by an investment-grade-rated unit of the group, including one that is trading at a discount of roughly 40% to its issue price.

Heimstaden told Reuters that its finances are sound, that its focus was on "robust liquidity" and investing in its bonds was low risk.

The ECB also gobbled up many German real estate bonds, including 39 issued by Vonovia, which has been selling property to cut debt. The bonds trade far closer to par, one at a discount of about 20%.

Property companies make up 8% of the ECB's Corporate Sector Purchase Programme, now worth 326 billion euros. The ECB does not disclose the make-up of its other, pandemic-era bond-buying scheme.

The central bank has suffered mishaps in the past, such as when it made a loss on bonds in scandal-hit South African retailer Steinhoff, and posted losses last year, fuelling concern that its capital cushion could shrivel.

The ECB outlines several lines of defence against losses, such as staggering them over several years or asking national central banks to chip in.

But the Dutch national central bank has warned that it might eventually need a capital increase by its finance ministry, which would likely infuriate taxpayers and raise questions about its independence from politics.

"When central banks make losses, it's ultimately a loss for the government, which means the taxpayers have to pay," said Gros. ($1 = 0.9117 euros) ($1 = 10.3532 Swedish crowns)

(Editing by Alexander Smith)