Zuckerberg: Muslims always welcome on Facebook

Mark Zuckerberg
Albert Gea | Reuters
Mark Zuckerberg

Muslims will always be welcome on Facebook, founder and CEO Mark Zuckerberg says.

The comments come just days after Republican presidential hopeful Donald Trump said Muslims should be barred indefinitely from entering the United States in the wake of the San Bernardino and Paris terror massacres.

"After the Paris attacks and hate this week, I can only imagine the fear Muslims feel that they will be persecuted for the actions of others," Zuckerberg wrote in a Facebook post Wednesday.

"As a Jew, my parents taught me that we must stand up against attacks on all communities. Even if an attack isn't against you today, in time attacks on freedom for anyone will hurt everyone.

"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," Zuckerberg wrote.

The Facebook boss recently had a baby with wife Priscilla Chan and said the couple would give away 99 percent of their Facebook shares during their lifetime, equivalent to around $45 billion.

Read MoreThe Zuckerbergs' unusual method of charitable giving

"Having a child has given us so much hope, but the hate of some can make it easy to succumb to cynicism. We must not lose hope. As long as we stand together and see the good in each other, we can build a better world for all people," Zuckerberg said.