FamilyMart Co. and Uny Group Holdings Co. have confirmed they are in merger talks and will decide the basic terms by August to form Japan's second-largest convenience store chain in terms of sales.

Uny will probably be merged into FamilyMart, the companies said in a joint statement Wednesday. The two retailers aim to close the deal by September 2016.

The deal comes as the industry faces declining sales amid the shrinking and aging population.