Nissan Motor and Honda Motor are discussing a merger that could create the world’s No. 3 carmaker and leave Japan with just two auto-manufacturing groups.

A combination of some sort has been under consideration for some time as the companies work to stay competitive in the face of overcapacity and the need for huge investments related to electric-vehicle and self-driving technologies.

Discussions have become more urgent in recent months.