By Jesús Aguado

It reported a net profit of 1.39 billion euros (£1.25 billion) for the three months to the end of June, topping the 1.29 billion euros expected by analysts in a Reuters poll.

The euro zone's largest bank by market capitalisation, which took over Banco Popular two years ago, recently agreed with unions on the closure of around 1,150 branches and layoffs in Spain -- around a tenth of its Spanish workforce.

It said it would take charges of 706 million euros, 600 million euros alone in Spain, where it booked a loss of 262 million euros. Excluding one-off costs, underlying net profit in the quarter was up 5%.

In Britain, its third-largest regional market after Spain and Brazil, profit fell 41%, due to a continued pressure on mortgage margins and to restructuring costs of 26 million euros and provisions of 80 million euros.

It had a solid performance in Brazil and Mexico in the second quarter and Chairman Ana Botin told an extraordinary general meeting that Mexico was an important part of its plan to invest and grow in Latin America.

Santander's diversification overseas, especially in Latin America, has helped the bank to cope with tough conditions for banks in Europe in the years since the financial crisis.

Santander confirmed at the meeting that it would fight a 100 million euro ($112 million) lawsuit being brought by Italian banker Andrea Orcel after it withdrew an offer to make him its chief executive earlier this year.

MEXICO DEAL

Shares in Santander were up 3%, against a 1% rise on the Spanish blue chip market, the Ibex <.IBEX>.

On Tuesday, investors signed off at an extraordinary shareholder meeting on a capital increase of 2.6 billion euros to finance the acquisition of a 25% stake they don't own of its Mexican subsidiary.

The move in Mexico is part of efforts to increase focus on emerging economies while cutting costs to counter squeezed margins in mature European markets.

While record-low interest rates have prevailed in the euro zone for the past 10 years, rates in Mexico stand at 8.25%, the highest since the 2008 global financial crisis.

In Mexico, where it aims to make around a tenth of its profits after the deal, profit rose 20% in the quarter.

"We believe in Mexico, it economy and its financial sector, and we think this is an appropriate time to continue to invest in Mexico and our Mexican subsidiary," Botin said, adding that this country offered higher profitability than other markets.

Analysts highlighted a good set of underlying trends mostly driven by Brazil and stronger than anticipated net interest income and lower provisions.

Net interest income, a measure of earnings on loans minus deposit costs, was 8.95 billion euros, up 5.6% from the second quarter of last year and 3.1% higher against the previous quarter due to a solid lending growth in Latin America.

Analysts had forecast a NII of 8.76 billion euros.

In Brazil, where the bank makes more than a quarter of its profits, profit rose 18% from a year ago, boosted by solid growth in business volumes, while profits in the United States rose 36%.

Santander ended the quarter with a core Tier-1 capital ratio, a closely watched measure of a bank's strength, of 11.3%, compared with 11.23% in the previous quarter, in line with its medium-term target of 11-12%.

Santander's chief financial officer Jose Garcia Cantera told analysts the bank expected another 20 to 30 basis points of regulatory headwinds in the second half of 2019.

"But at the same time we would expect our capital to grow from here until the end of the year (...) our target is to get to 11.5 percent as soon as possible," Cantera said.

(Reporting By Jesús Aguado; Editing by Keith Weir)

By Jesús Aguado