Tayyip Erdogan. Pic/AFPTayyip Erdogan. Pic/AFP

A defiant President Tayyip Erdogan on Sunday stepped up his attack on the European Union, saying Turkey had to go its own way and vowing to bring back the death penalty if parliament passes it.

Erdogan was at the opening ceremony for a memorial dedicated to the roughly 250 people who died during last year's failed coup.

In the speech in Ankara on Sunday he said he would approve, "without hesitation" the death penalty, if parliament voted to bring it back – a move that would effectively end Turkey's bid to join the European Union.

"I don't look at what Hans and George say. I look at what Ahmet, Mehmet, Hasan, Huseyin, Ayse, Fatma and Hatice say," he said.