Tesco Bank, which serves more than 23,000 mortgage customers with total balances of 3.7 billion pounds, said it would stop new lending and seek to sell its existing portfolio of home loans.

"In recent years, challenging market conditions have limited profitable growth opportunities," said Tesco Bank Chief Executive Gerry Mallon.

Bellwether mortgage lender Nationwide on Tuesday said that its net interest margin - a measure of underlying profitability - fell to 1.22% in the year to April 4, from 1.31% for the previous 12-month period, though it was able to stabilise income.

The statements from the two lenders show how competition and a subdued economy are squeezing margins in Britain's home loans sector, a key profit source for banks.

Nationwide said it expects margins to remain under pressure this year.

"As you can imagine, pricing remains extremely competitive. We have seen some stability in new business pricing over recent months, but overall trends in margins you will continue to see," said senior Nationwide executive Chris Rhodes.

Uncertainty over Britain's exit from the European Union has prevented interest rate increases that could have boosted loan margins, while a glut of new banks and rules pushing established players to lend more have increased the supply of mortgages.

Europe's biggest bank HSBC, in particular, has renewed its focus on home loans in Britain after the introduction of ring-fencing rules to insulate savers' money from riskier trading activity forced it to carve out its British retail bank.

The newly separated domestic bank had little choice but to boost mortgage lending to make money, intensifying competition in the market.

Credit ratings agency Fitch said it expects other lenders to follow suit and quit home lending as a result of the influx of lending from newly ring-fenced banks.

Fitch said it had also seen a rise in riskier mortgage lending at some banks, with higher loan-to-value ratios that could be exposed to any economic downturn or disruptive Brexit.

However, the agency said these higher-risk mortgages remained a low proportion of lenders' overall loan books.

Tesco bank said its priority would be to sell the entire mortgage portfolio for an acceptable price as it exits the business in favour of other unspecified opportunities.

(Reporting by Lawrence White and Iain Withers; Editing by Louise Heavens, Mark Potter and David Goodman)

By Lawrence White and Iain Withers