LONDON - HSBC has agreed to sell its business in Canada to Royal Bank of Canada for $13.5 billion Canadian dollars ($10.04 billion) in cash.

The sale comes as HSBC pursues a strategy of focusing its resources on its core markets, amid pressure from its biggest shareholder Ping An to improve its performance.

Chinese insurance company Ping An Insurance Group has been pushing HSBC to split off its Asian business to boost returns.

"We decided to sell following a thorough review of the business, which assessed its relative market position within the Canadian market and its strategic fit within the HSBC portfolio," Chief Executive Noel Quinn said.

HSBC's shares were up 4% following the announcement, against a benchmark FTSE 100 index up 0.7%.

The transaction is expected to complete in late 2023 and will result in a pre-tax gain of $5.7 billion for HSBC, the British bank said in a statement.

HSBC may return some of the proceeds of the sale to shareholders via a one-off dividend or buyback from early 2024 onwards, the bank said.

The deal will enable RBC to take more market share in its home market, adding 130 branches and more than 780,000 retail and commercial customers. If successful it will be the first big banking merger in a decade in Canada.

HSBC said in October it was considering the sale of the Canadian unit as it looks to beef up returns following pressure from Ping An.

HSBC is Canada's seventh biggest bank with assets of C$125 billion, and it earned C$490 million before tax as of June 30, based on its latest financial results. Analysts had valued HSBC's Canada business in the range of C$8 billion to C$10 billion.

The sale to RBC is expected to attract scrutiny from Canada's antitrust agency as the country's banking market is heavily concentrated, with the top six lenders controlling about 80% of the total assets, based on Reuters calculations.

HSBC hired JP Morgan to advise on the sale, Reuters previously reported.

($1 = 1.3444 Canadian dollars)

(Reporting by Iain Withers and Lawrence White in London and Pushkala Aripaka in Bengaluru; Editing by Shinjini Ganguli, Sinead Cruise and Jane Merriman)