Japan’s two largest oil refiners agreed to merge in 2017 as a shrinking population and a shift to more fuel-efficient automobiles pushed down fuel demand in the country. The deal is the second merger between major oil refiners in the country in the last one month.

JX Holdings Inc., Japan's largest oil refiner and seller, will take over smaller rival TonenGeneral Sekiyu KK, through a share swap agreement announced Thursday, to form a combined company with control of more than half the country’s gasoline market and estimated sales of 14 trillion yen ($113 billion) annually.

The proposed behemoth will look to save more than 100 billion yen ($811 million) annually, the companies said in a statement, adding that the agreement would be finalized in August 2016 after the merger ratio is worked out.

The deal follows a similar one struck by Idemitsu Kosan and Showa Shell Sekiyu KK, Japan's second-largest and fifth-largest refiners by sales, as a continued trough in oil prices and lower demand force refiners to shed excess production capacity and retail outlets.

“By reducing the number of refiners to two major companies, the industry would likely see better refining margins,” Syusaku Nishikawa, an analyst at Daiwa Securities Co.,  told Bloomberg Thursday, prior to the announcement.

Demand for oil-related products will reportedly fall about 6.8 percent in the five years through the end of March 2020, according to a forecast in April by the Japanese Ministry of Economy, Trade and Industry.

Last month, TonenGeneral cut its full-year profit forecast by 92 percent from 15 trillion yen ($121.5 billion) to 2 trillion yen ($16.2 billion), citing lower crude prices and inventory losses. JX Holdings also slashed its net profit forecast by 72 percent for this financial year.

The two companies said Thursday that they would work towards integrating their production facilities in the Kawasaki area and eliminate overlapping resources, but intend to retain their retail brands after the merger.