The likelihood of the ruling Republican Party (HHK) losing control over Vanadzor increased on Thursday after two opposition parties that did well in a local election reached an agreement on the next mayor of Armenia’s third largest city.

The HHK won most votes in the municipal election held on Sunday but fell short of an absolute majority in the new city council that will choose the Vanadzor mayor.

The party headed by President Serzh Sarkisian gained 13 council seats, compared with a total of 18 seats won by its three main local challengers: the Bright Armenia, Armenian Renaissance and Prosperous Armenia (BHK) parties. The two remaining councilors will represent the Armenian Revolutionary Federation, Sarkisian’s junior coalition partner.

Bright Armenia, which won 10 council seats, offered on Monday to cut a power-sharing deal with Armenian Renaissance and the BHK. It went on to reject far-reaching conditions for such a deal that were set by Armenian Renaissance.

Armenian Renaissance, which will have 5 seats in the Vanadzor legislature, appeared to have dropped those conditions on Thursday, saying that it will back Bright Armenia’s mayoral candidate, Krist Marukian.

In a statement, the party formerly called Orinats Yerkir said the decision is the result of “long negotiations” held by its leader Artur Baghdasarian with Marukian and his brother Edmon, who is Bright Armenia’s founding chairman.

The statement cited the need for major “changes” in Armenia and the fact that most Vanadzor voters backed opposition parties in Sunday’s election.

It remained unclear whether the BHK will join the agreement and thus make Kritst Marukian’s election a forgone conclusion. BHK representatives said earlier this week that they are considering Bright Armenia’s coalition offer.

Armenian Renaissance’s apparent U-turn followed an embarrassing scandal involving its mayoral candidate in Vanadzor, Arkadi Peleshian. The latter was detained on Wednesday after being accused of a violent assault connected with the municipal vote.

Peleshian was later set free after signing a formal pledge not to leave the city until a criminal investigation into the incident is over.