Turkish President Recep Tayyip Erdogan on Thursday praised Facebook founder Mark Zuckerberg for emphasising the difference between Islam and terror, after the billionaire social network tycoon posted a message defending Muslims against discrimination.

Erdogan, who once threatened to ban Facebook in his country, used his official page on the website to respond to Zuckerberg both in Turkish and in English.

"I highly value Mark Zuckerberg's message for pointing out the profound difference between Islam and terrorism since these two concepts are often mentioned in the same breath these days," he wrote.

"As I always express on different platforms, Islam is a religion of peace. Murderous networks that abuse Islam for their self-serving goals are massacring innocent people every day, particularly Muslims."

In a Facebook post on Wednesday, Zuckerberg said that the Muslim community should not have to fear being "persecuted for the actions of others" following attacks in Paris and elsewhere carried out by Islamic extremists.

"If you're a Muslim in this community, as the leader of Facebook I want you to know that you are always welcome here and that we will fight to protect your rights and create a peaceful and safe environment for you," he said.

The supportive message came just days after Republican presidential candidate Donald Trump caused international outrage by demanding a ban on Muslims traveling to the United States.

Erdogan, who was elected president last August after ruling Turkey as premier for over a decade, has in the past made no secret of his disdain for social media, vowing to "eradicate" Twitter ahead of local elections in March 2014.

The government blocked Twitter and YouTube days before March 2014 local elections after they were used to spread a torrent of audio recordings implicating Erdogan and his inner circle in an alleged corruption scandal.

He had at the time raised the option of a ban on Facebook, arguing that his opponents were using the social media site to attack him.

But the Turkish strongman appears to have softened his stance in recent times.

His official Facebook page is now used regularly to post his speeches and statements, while Erdogan in February even finally began tweeting from the official handle @RT_Erdogan.

dg/sjw/kjl