ISTANBUL (Reuters) - Turkey’s ruling AK Party and the nationalist opposition on Wednesday said they formally agreed to an electoral alliance, a move aimed at ensuring Tayyip Erdogan will secure the required 50 percent in a 2019 presidential election.

FILE PHOTO: Turkish President Tayyip Erdogan addresses members of parliament in Ankara, Turkey, January 9, 2018. REUTERS/Umit Bektas /File Photo

The agreement between Erdogan’s AKP and the Nationalist Movement Party (MHP) also includes measures designed to ensure electoral security, officials for both parties said, proposals likely to be seen by the main opposition as potentially opening the door to voter fraud.

The tie-up underscores Erdogan’s continued reliance on the MHP, the smallest of parliament’s four factions. Last year the MHP backed a vote to create a presidency with sweeping executive powers, helping the proposal squeak by with 51.4 percent of the vote.

Turks will vote in both presidential and parliamentary elections next year.

An AKP official also said new voter safety regulations would make ballots admissible even when they were missing the official stamp of the YSK High Election Board.

The YSK made a last-minute decision during the 2017 referendum to allow the counting of unstamped ballots, saying such a move was not unprecedented and the government had previously permitted it. The main secular opposition unsuccessfully appealed against that decision.

The YSK will also be given the authority to merge electoral districts and move ballot boxes to other districts, officials of both parties told a news conference. Security forces will also be allowed to attend to ballot boxes when requested by any voter and not leave until the reason for the request has been resolved, they said.

The measures need to be approved by parliament, where the AKP and MHP together have more than the required seats to pass laws.

MHP leader Devlet Bahceli has said that he wants a reduction in the minimum 10 percent of votes cast required for a party to enter parliament. Bahceli is facing a challenge from a prominent nationalist and former interior minister, Meral Aksener, who last year founded her own party after breaking off from the MHP.

One recent poll suggested that Aksener’s Iyi Party (“Good Party”) could eclipse the MHP and keep it from the 10 percent threshold. Aksener said she could seek an alliance with smaller parties that have not received sufficient votes to enter parliament in the past.

The MHP won as much as 18 percent in the 1999 parliamentary election but slipped below the threshold with 9.5 percent in 2002. It has exceeded 10 percent in elections since and took 11.9 percent in the November 2015 vote.

Its popularity has been somewhat on the wane among hardcore nationalists, who are wary of an alliance with Erdogan. The MHP espouses a mix of nationalism and scepticism towards the West. It strongly opposes autonomy for Turkey’s Kurdish minority.