ANKARA — Turkey’s two main opposition parties backed an Islamic-leaning intellectual on Monday to challenge an expected bid by Prime Minister Recep Tayyip Erdogan for the presidency.

The Republican People’s Party (CHP) and Nationalist Movement Party (MHP) threw their support behind Ekmeleddin Ihsanoglu, an experienced academic and diplomat, to run against Erdogan in Turkey’s first democratic presidential vote on August 10.

“We propose a name that everyone can agree on and who can serve as a model of dignity, honesty and knowledge,” CHP leader Kemal Kilicdaroglu said.

Monday’s announcement capped weeks of intense talks between opposition parties aimed at finding a candidate capable of challenging Erdogan, who has held power since 2003.

Devlet Bahceli, head of the ultra-nationalist MHP, said his party was “pleased” with the choice of Ihsanoglu.

But the decision to back a political novice, seen by many as conservative and Islamic-leaning, was criticized by secular opposition members.

Ihsanoglu “doesn’t conform to the profile of potential candidates we discussed,” CHP deputy chief Melda Onur wrote on Twitter.

The two parties still need to formally endorse the candidacy of Ihsanoglu, former head of the Organisation of Islamic Cooperation (OIC).

Already in his third term as prime minister — the maximum permitted under his own party’s rules — Erdogan has made no secret of his ambition to run for the top job.

Despite widespread street protests and a corruption scandal implicating key government allies, Erdogan’s conservative Justice and Development Party (AKP) scored a crushing victory in March local elections.

Born in Cairo to Turkish parents, 70-year-old Ihsanoglu, who served as OIC head between 2005 and 2014, has written several books on Islamic and Turkish culture, and served as an envoy to Bosnia and Gambia in a long diplomatic career.