HSBC Holdings <0005.HK> has sold its banking operations in Costa Rica, El Salvador and Honduras to Colombia's Banco Davivienda S.A. for $801 million (513 million pound), continuing its retreat from countries where it lacks scale.

HSBC, Europe's biggest bank, said the sale marks its 18th deal in the past year, with the combined deals releasing more than $48 billion of risk-weighted assets.

The business being sold had 136 branches, with assets of about $4.3 billion and loans of $2.5 billion.

Stuart Gulliver, HSBC chief executive, is reshaping the bank to cut annual costs by $3.5 billion, lift profitability and sharpen its focus on Asia. That has seen it sell its credit card business and some branches in the United States and shrink or exit Russia, Poland, Chile and other countries.

Davivienda, Colombia's third-largest bank, will pay cash for the deal, which is expected to complete in the fourth quarter of this year.

The transaction demonstrates our commitment to driving growth and improving returns in Latin America by divesting of businesses that do not meet our investment criteria, said Antonio Losada, CEO-designate of HSBC Latin America.

The sale includes 29 branches in Costa Rica, 57 in El Salvador and 50 in Honduras.

(Reporting by Steve Slater; Editing by Hans-Juergen Peters)