Improved results in Brazil helped Spain's Banco Santander beat profit estimates, offsetting weak performances in its domestic market and in Britain.

Its shares climbed to a six-month high after today's figures.

Despite falling net profit in Britain and Spain, Santander's operations in its biggest territory Brazil and other emerging markets have helped it cope with a squeeze on margins in Europe that has pressured its banking peers. 

Santander had slipped behind BNP Paribas to be the euro zone's second-biggest bank by market value.

It today reported a 1% rise in net profit to €1.7 billion, beating an average estimate of €1.5 billion in a Reuters poll. 

The lender's fortunes continued to improve in Brazil, where it posted rises in profit and net interest income (NII), a measure of earnings on loans minus deposit costs, against the previous year and the second quarter. 

Santander had cut its group profitability goal last month, along with its targets for Spain and Britain.

It warned investors that it saw tougher times ahead due to record low interest rates and the British vote to leave the European Union. 

But its boss Ana Botin said today that Santander was still on track to meet its objectives for this year and next despite the interest rate environment.

"We expect to finish 2016 with profit growing against the year before, which will allow us to increase the dividend per share and profit per share," Botin said in a statement.

In Britain, Santander said it expected its margins to remain "broadly stable" since the Brexit vote, but there would be lower consumer confidence and economic growth in future. 

Its British profits have been hit by the slump in sterling, which has fallen close to 20% since the June referendum. 

"Although we have not seen a material impact on our business in the short period since the EU referendum, we do expect a more challenging macroeconomic environment ahead," said UK head Nathan Bostock. 

Analysts highlighted the performance of its Latin American markets, in particular Brazil and Mexico, whose results had outperformed consensus by about 20% according to analysts, and flagged its slowing Spanish business. 

Net interest income and net profit in Brazil rose for the second quarter in a row after a deep recession there caused returns to tumble last year. 

Santander's net interest income was €7.8 billion in the third quarter, down 2.3% from a year ago, mirroring pressure on margins experienced by other Spanish banks such as Bankia.  

In Spain, Santander said its margins were squeezed by mortgages re-pricing to lower rates.