Ekmeleddin Ihsanoğlu, the Republican People's Party (CHP) and the Nationalist Movement Party's (MHP) joint presidential candidate, mixed up the words of the national anthem of Turkey (Istiklal Marsi) on, a huge insult in a country which sets great store by patriotism.
Ihsanoğlu, a softly-spoken, bespectacled intellectual, had visited a cemetery in Istanbul while campaigning and stopped by the tomb of poet Mehmet Akif Ersoy, the author of the words to the national anthem of Turkey.
The 70-year-old, a former head of the Organisation of the Islamic Cooperation (OIC), boasted that Ersoy was a friend of his father in the early 1900s when the Turkish republic was founded.
But he committed a gaffe when he uttered the famous poet's verses from the national anthem written on the tomb only to say that they were from another poem called "Canakkale Sehitleri" (Martyrs of Gallipoli).
The episode is potentially damaging to Ihsanoğlu, who has already had to defend his patriotism as he was born in Egypt where his cleric father
was living in exile.
Ihsanoğlu's faux pas created a storm in social media, under the hashtag #istiklalmarsi.
"Can someone who does not know his national anthem be a president? He could not even pass his class," wrote a Twitter user ilhanbozkurt78.