Armenia’s government and leading opposition parties reached late on Thursday a compromise agreement on a set of legal safeguards aimed at ensuring the freedom and fairness of next year’s parliamentary elections.

The deal was made possible by more government concessions made to the parliamentary opposition after three months of negotiations on a new Electoral Code that was adopted by the Armenian parliament last month.

Senior representatives of the government and three opposition parties represented in the National Assembly issued a joint statement specifying changes that will be made in the code before the elections due in April 2017.

The most important of those changes call for the introduction of a biometric registry of voters which is supposed to prevent multiple voting by government loyalists. This will be done through electronic machines that will check voters’ identity through fingerprints and new, plastic ID cards.

The government agreed to also give opposition parties, non-partisan observers and media greater access to the lists of voters who will have cast ballots in the elections. They will be released by the same machines to be placed in Armenia’s 2,000 or so polling stations.

In addition, the Armenian authorities will install video cameras in all of those stations and ensure live broadcasts of voting and ballot counting there through the Internet.

It was also announced that the government, the opposition and civil society members will set up a joint commission that will oversee the introduction of the new voter registry and organize the online broadcasts.

The joint statement emphasized that the agreement’s implementation will hinge on Western donor funding for the new equipment needed for the anti-fraud measures.

It also cautioned that the parties to the agreement have yet to iron out their differences on other key provisions of the Electoral Code relating to the way in which Armenia’s next parliament will be chosen. The existing version of the code envisages a complicated system of proportional representation that has been criticized by the opposition.

The government representatives and parliamentary leaders of the opposition Armenian National Congress, Prosperous Armenia and Orintas Yerkir parties pledged to hold more talks in an attempt to reach a compromise on the electoral system as well.

The 2017 elections will take place one year before Armenia completes its ongoing transition to the parliamentary system of government. They will determine who will govern the country after President Serzh Sarkisian completes his second and final term in 2018.