(Adds deal details and context)
MEXICO CITY, Jan 28 (Reuters) - Mexican supermarket chain Comercial Mexicana has agreed to sell most of its stores to its rival Soriana for 39.19 billion pesos ($2.66 billion), the two companies said on Wednesday.
Comercial Mexicana, known locally as Comerci, said the sale of 160 stores, including the low-price Mega and Bodega Comercial Mexicana formats, will allow it to focus on its other brands where it sees greater growth opportunities.
Comerci, which first said it was exploring a sale in January 2014, will be left with just 40 stores. It will keep its upmarket, higher-margin retail formats such as City Market, and some other assets that contribute around 22 percent of its revenue.
It will spin off those assets into a new company, allowing Soriana to make an offer to buy the rest of Comerci, subject to competition and stock exchange approvals.
The deal will give Mexico's No. 2 supermarket Soriana, which had 664 stores at the end of the third quarter, rights to Comerci branding for two years, use of technology systems for three years and 21,300 employees.
Soriana said the new stores would lift its total sales by 37 percent.
Market leader Wal-Mart de Mexico, Mexico's largest retailer, had 2,225 stores in Mexico at the end of September.
$1 = 14.7212 Mexican pesos Reporting by Christine Murray; Editing by Lisa Shumaker and Kenneth Maxwell