SANTIAGO, Chile (AP) — Chile’s political parties from the left to the right have agreed to try again to replace the constitution imposed by Gen. Augusto Pinochet’s military dictatorship four decades ago.

The accord was announced in the former Congress building, the same place where Chile’s entire political firmament — except for the Communist Party, which wouldn’t join them — agreed in 2019 to begin the constitutional process that wound up being rejected on Sept. 4 by 62% of the voters.

That rejection was a stinging setback to President Gabriel Boric, who had argued that the document would usher in a new progressive era. Chile’s current constitution is a market-friendly document that favors the private sector over the state in aspects like education, pensions and health care, and makes no reference to Indigenous people who represent nearly 13% of the population.

Most Chileans favor changing the constitution, but across the country of 19 million, polling showed wariness with the process, which resulted in an unwieldy 388-article charter that would have introduced rights to free education, health care and housing and established autonomous Indigenous territories, among other things.

This time, the 14 parties agreed to convene a new commission with 24 experts appointed by Congress who will lay the framework for 50 people elected democratically in April 2023 to draft the new charter. They’ll be joined on the commission by representatives of Chile’s Indigenous population, whose numbers will be determined in the same popular vote.

The final debate Monday night revolved around the number of commissioners and how to choose them. The ruling party wanted everyone involved to be elected, while the right-wing opposition wanted a mix of appointees and elected members. Both conceded to reach a deal.

The accord also calls for a new charter to be based on a dozen constitutional principles previously determined by the political parties, including that Chile has a unitary but decentralized government with separate and independent executive, judicial and legislative branches.

Other principles include that Chile’s 11 Indigenous peoples be recognized as part of the Chilean nation; and that fundamental freedoms and rights be recognized, among them, the right to life and property, and that Chile’s military forces must always be subordinate to the civil government.

The parties also agreed that a neutral “arbiter” will advocate for respect for these fundamental principles, made up of 14 judges, one for each party, designated by Congress.

Monday night’s accord now must be approved by a vote of 4/7ths of the Congress — 29 senators and 89 deputies. The members will then have five months to draft a new charter, which must be approved or rejected in an obligatory nationwide vote late next year.