BEIRUT (Reuters) - Syria accused Turkish President Tayyip Erdogan on Thursday of exploiting a failed coup to implement a harsh Islamist agenda that endangers Turkey and its neighbors.

"(Erdogan) used the coup to implement an extremist agenda, the agenda of the Muslim Brotherhood inside Turkey," President Bashar al-Assad told a Cuban news agency, according to a Syrian presidency social media account. "This is dangerous for Turkey and for its neighboring countries, including Syria."

Relations between Assad and Erdogan, once close allies, soured after the start of Syria's conflict in 2011. Damascus accuses Ankara of fuelling the civil war by supporting Islamist insurgents and allowing foreign jihadists to cross into Syria.

(Reporting by Kinda Makiyeh; writing by Dominic Evans; editing by Mark Heinrich)