MADRID (Reuters) - Spanish real estate group Reyal Urbis (>> Reyal Urbis SA) said on Tuesday it was in talks with creditors to refinance around 4 billion euros ($5.2 billion) of debt and if it did not reach an agreement it might need to seek creditor protection.

"The company has started talks to reach refinancing agreement, or alternatively, it would seek protection under the bankruptcy law," the company said in a statement to the stock exchange.

The company's creditors include Santander (>> Banco Santander, S.A.), BBVA (>> Banco Bilbao Vizcaya Argentaria S.A.), Bankia (>> Bankia SA) and Popular (>> Banco Popular Espanol SA). Shares in Reyal Urbis, down 72 percent since the start of the year, fell 10.5 percent.

Spain's banks lent hundreds of billions of euros to property developers during a decade-long property boom, although their exposure to losses related to these investments has largely been recognized because of government-enforced write-offs of 137 billion euros.

Those worst affected will shortly receive the first funds from a 100 billion euro credit line agreed with Europe in June to bail out Spain's banks.

During the property boom, Reyal Urbis used debt to buy rivals but its business declined sharply after the bubble burst in 2008. The group posted losses of 212 million euros for the first half of 2012.

Reyal Urbis refinanced 4.6 billion euros of debt in May 2010 and extended the maturity of a syndicated loan to December 2016. The refinancing included selling assets, including undeveloped land, to banks at deeply discounted prices to their book value.

Earlier this month, two Spanish investment firms that owned 31 percent of French property company Gecina (>> GECINA NOM.) filed one of the biggest bankruptcy actions in Spanish history after a bank refused to refinance a 1.6 billion euro loan.

(Writing By Sonya Dowsett. Editing by Jane Merriman)

By Robert Hetz and Tomás Cobos