Chilean political parties have agreed to a referendum on replacing the country’s Pinochet-era constitution, in a deal which could help end nearly a month of sometimes violent political unrest.

The country has been rocked by weeks of demonstrations which began over subway fares and quickly grew into a broader protest over economic inequality and political exclusion.

Much of the protesters’ anger has focused on Chile’s 1980 constitution, which is seen as the embodiment of Augusto Pinochet’s neoliberal model, prioritizing a market-driven economy but failing to adequately guarantee healthcare, education and pensions.

After an agreement hammered out in congress early on Friday, a nationwide plebiscite in April will ask Chileans if they want a new constitution – and how it will be drafted.

Once the draft is complete, the new constitution will be submitted to a second, compulsory referendum for ratification.

The interior minister, Gonzalo Blumel, said: “This agreement is a first step, but it is a historic and fundamental first step to start building our new social pact, and in this the citizenry will have a leading role.”

The deal represents a major concession from president Sebastián Piñera, who had previously rejected the idea of a constitutional assembly in favour of drafting a new framework in congress.

But pressure on Piñera rose this week after a string of arson attacks on landmark buildings and speculation that the army could be called back on to the streets.

In response, the Chilean government finally warmed to a political compromise, inviting party leaders to discuss protesters’ demands.

“Overall, this is a good agreement because it represents political consensus and we had reached a dead end,” said Cristóbal Bellolio, a politics professor at Adolfo Ibañez University in Santiago.

“It means that for the first time in our history we will have a constitution that belongs to all of us, which is the product of a true democratic process – not drafted by a group of six or seven experts and given to us by a dictator,” he said.

The latest poll from Cadem asserted that 78% of Chileans wanted a new constitution, while a constitutional assembly was the most popular mechanism through which to achieve this.

“The constitution of the dictatorship has died,” progressive senator and former foreign minister Heraldo Muñoz said after Friday’s vote.

Although full details of how the process will work remain unclear, Catalina Pérez, the leader of the Revolución Democrática party and one of the document’s 10 signatories, described it as a watershed moment for Chile.

“After more than 25 days of protests, the government was left with no option but to transfer power to the people – this is just the beginning of a fundamental change towards a more equal society,” she told AFP.

Protesters who had gathered in Santiago’s Plaza Italia on Friday morning suggested that the deal was a step in the right direction, but remained unconvinced by some of the details.

“Of course it’s a historic moment, but it’s just not enough,” said small business owner Enrique Cisterna, who expressed concern that reforms could still be hobbled by a requirement that every article in the new constitution will require approval by a two-thirds majority in congress.

Close by, 74-year-old retiree Juan Manuel Lanata held a hand-painted sign underlining his disappointment with the agreement.

“I believe that it is my duty to come here to register my dissent,” he said. “The two-thirds requirement is absurd – it’s a betrayal of the people! These protests will continue because this deal is not enough.”