Santander's comments were included in a document sent to investors in connection with a 7 billion-euro (£6 billion) rights issue flagged in June when it bought Popular. The share issue was launched on Monday.

The warning marks a shift in Santander's stance on the deal, which has been broadly positive until now.

Spain's largest bank said legal claims over a Popular rights issue last year and its rescue last month, as well as risks attached to a soured 30 billion euro real estate portfolio, could harm its earnings.

"An estimate of the legal claims shows they could affect the acquisition of Popular, including possible compensation payments that could have a significant adverse effect on the results and financial position of the Santander Group," the bank said.

On Monday, Santander said it expected a profit of 3.6 billion euros for the first half of 2017.

Santander said there was an "indeterminate" number of legal claims related to the takeover of Popular, which it bought in early June for the symbolic price of one euro after European authorities stepped in to prevent its collapse.

A banking source with knowledge of the deal said the total claims could reach 2 billion euros.

Santander also said that because the deal was done quickly it had had limited access and a reduced period of time to analyse Popular's books. As a result, Santander said it could have overestimated the benefits of the deal, which it calculated then at close to 500 million euros per year from 2020.

KEEP THE CLIENTS

To make the deal a success, Santander said the key would be to retain Popular's more than 4 million clients.

"It's going to be an integration that is going to be done by putting the client above all other considerations," Santander's chief financial officer, Jose Garcia Cantera, told Reuters in an interview last month.

"What is important is that it makes strategic and financial sense, and it fits in with our public objectives to have a return above the cost of capital," he said.

Santander said it now holds a 25 percent share in small and medium-sized enterprise (SME) lending in Spain after absorbing Popular's SME business. The SME sector offers higher returns for shorter loan periods in contrast to the more sluggish mortgage market.

A Santander statement in June said that Popular's market share of the SME sector was not the 17.7 percent publicly stated by Popular at the end of March but 13.8 percent, as a result of inaccuracies in Popular's accounting and client flight.

Santander also said on Tuesday it did not yet know the scope of Popular's property loan troubles and it still could find more deteriorated assets, unknown risks and hidden debts, than it had initially expected.

Popular's non-performing loan ratio had reached 20 percent from around 15 percent at the end of March, Santander said on Monday.

As part of the transaction, Santander set aside around 8 billion euros to cover Popular's non-performing assets, which are the highest among Spanish banks.

(Editing by Angus Berwick and Jane Merriman)

By Jesús Aguado