Idemitsu Kosan Co. and Showa Shell Sekiyu K.K. have agreed to merge on an equal footing, they said Thursday, in a move that could trigger realignment in Japan's highly competitive refinery industry.

The second- and fifth-largest Japanese oil distributors, which had announced plans for a merger in July, will integrate their businesses starting between next October and April 2017.

Idemitsu Kosan Co. signed a nonbinding agreement to merge with Showa Shell Sekiyu K.K., almost four months after buying a third of its rival Japanese refining company.