Nepal’s major political parties agreed over the weekend on how to divide the country into states in a significant step that could help speed the adoption of a new federal constitution.

The Himalayan nation has struggled to codify a new political system to replace a centuries-old monarchy that ended in 2008 after years of civil war between the government and Maoist insurgents.

“I...