SANTIAGO, Chile — Lawmakers in Chile agreed on Friday to hold a referendum next April on replacing the country’s dictatorship-era constitution, bowing to demands of protesters who want the country’s social and economic model overhauled.

Voters will be asked whether they approve the idea of a new constitution and whether current lawmakers should serve on the commission that would redraft the document.

The two-page “Agreement for Peace and a New Constitution,” signed after midnight following intense negotiations, calls for a “commitment to re-establish peace and public order in Chile.”