ISTANBUL - Turkish President Recep Tayyip Erdogan was on Sunday leading his main rival in a tightly-contested presidential election, seeking to extend his 15-year grip on power in the face of a revitalised opposition and weakening economy

Turkish voters had for the first time cast ballots for both president and parliament in the snap polls, with Erdogan looking for a first round knockout and an overall majority for his ruling Justice and Development Party (AKP).

The stakes in this election are particularly high as the new president will be the first to enjoy enhanced powers under a new constitution agreed in an April 2017 referendum strongly backed by Erdogan.

Initial indications showed Erdogan was on course to defeat his nearest rival Muharrem Ince with more than half the vote to win a new presidential mandate without needing a second round.

Erdogan has just under 53 percent while Ince, of the secular Republican People's Party (CHP), was on just over 30 percent, state-run Anadolu news agency said, based on a 93 percent vote count.

But these are still partial results and the outcome could yet change as final ballot boxes are opened.

Trailing were Meral Aksener of the nationalist (Iyi) Good Party with over seven percent and Selahattin Demirtas of the pro-Kurdish Peoples' Democratic Party (HDP) with almost eight percent.

A count of almost over 90 percent for the parliamentary election also showed that Erdogan's ruling Justice and Development Party (AKP) - along with its Nationalist Movement Party (MHP) allies - were well ahead and set for an overall majority.

The pro-Kurdish Peoples' Democratic Party (HDP) was polling 11 percent, well over the 10 percent minimum threshold needed to win seats, which would make it the second largest opposition party in the new chamber.

Erdoogan had faced an energetic campaign by Ince, who has rivalled the incumbent's charisma and crowd-pulling on the campaign trail, as well as a strong opposition alliance in the legislative poll.

Ince vowed to spend the night at the headquarters of Turkey's election authority in Ankara to ensure a fair count and urged supporters to stay in polling stations until the final vote was counted.

The CHP said it had recorded violations in particular in the southeastern province of Sanliurfa, although Erdogan insisted, after voting himself, there was no major problem.

"I will protect your rights. All we want is a fair competition. Have no fear and don't believe in demoralising reports," Ince said after polls closed.

Celebrations were already beginning outside Erdogan's residence in Istanbul and AKP party headquarters in Ankara, AFP correspondents said.

Several world leaders supportive of Erdogan, including Azerbaijani President Ilham Aliyev and Qatari Emir Tamim bin Hamad Al-Thani, called to congratulate him on his "victory", the presidency said.

Erdogan has overseen historic change in Turkey since his Islamic-rooted ruling party first came to power in 2002 after years of secular domination. But critics accuse the Turkish strongman, 64, of trampling on civil liberties and autocratic behaviour.

Although Erdogan dominated airtime on a pliant mainstream media, Ince finished his campaign with eye-catching mass rallies, including a mega meeting in Istanbul on Saturday attended by hundreds of thousands of people.

The president has for the last two years ruled under a state of emergency imposed in the wake of the 2016 failed coup, with tens of thousands arrested in an unprecedented crackdown which cranked up tensions with the West.

Erdogan, whose mastery of political rhetoric is acknowledged even by critics, has won a dozen elections but campaigned against the backdrop of increasing economic woes.

Inflation has zoomed well into double digits - with popular concern over sharp rises in staples like potatoes and onions - while the Turkish lira has lost some 25 percent in value against the US dollar this year.

But the opposition has lambasted the uneven nature of the poll, which saw state-controlled television ignore Ince's giant rally in Istanbul on the eve of the election.

And in a situation labelled as blatant unfairness by activists, the HDP's Demirtas has campaigned from a prison cell after his November 2016 arrest on charges of links to outlawed Kurdish militants.

After casting his ballot in his jail in the northwestern region of Edirne, Demirtas wrote on Twitter: "I wish that everyone uses their vote for the sake of the future and democracy of the country."

French delegation detained in Turkey during election

A French delegation of Communist party members, including a senator, was detained in Turkey on Sunday while trying to observe parliamentary and presidential polls there, the party announced.

"Turkish authorities want to snuff out any criticism of the massive fraud underway," a Communist Party statement said, adding that senator Christine Prunaud was among those detained.

The state-run Turkish news agency Anadolu reported Sunday that around 10 Europeans faced legal action including three French citizens, three Germans and four Italians allegedly for acting as election observers without accreditation . One of the arrested French Communists, Hulliya Turan, told AFP that the group was arrested in Agri in the east at 1030 am (0730 GMT) and held all day in a police station until 5 pm when polling stations closed.

"They told us that we will not be prosecuted because our presence was not a crime," Turan said.

Turkey's main opposition party, the Republican People's Party (CHP), has expressed alarm over the number of complaints of voting violations in the mainly Kurdish south east of the country.

Turks are voting in twin legislative and parliamentary elections which are seen as the toughest test President Recep Tayyip Erdogan has undergone at the ballot box. Tens of thousands of Turkish citizens are responding to calls from the opposition to monitor the polls for a clean election and a delegation of observers from the Organization for Security and Cooperation in Europe (OSCE) is also in plac