Morrisons, which bought Safeway earlier this year, intends to focus on larger properties, with the aim of converting stores to its own brand.
Somerfield's acquisition includes 63 leasehold Safeway compact convenience stores, worth£115 million. The remaining 51 stores, mostly freehold, will be initially sold to an investment company for£142 million, and then leased back to Somerfield.
Somerfield chief executive Steve Back said: 'This acquisition represents an excellent opportunity for Somerfield to grow its estate without a significant increase in gearing, and to capitalise on its proven expertise in operating smaller stores.'
The acquisition reflects Somerfield's focus on stores trading with less than 15,000 sq ft (1,395 sq m). Meanwhile, the deal will enable Morrisons to save an estimated£10.2 million in rent a year.
The deal is likely to be completed by March next year and is not conditional on an Office of Fair Trading approval. Some 9,000 Safeway staff will be transferred to Somerfield in the process.