Despite publicly supporting Donald Trump's bid to become president for quite some time, Peter Thiel's recent $1.25 million donation to the Republican candidate's campaign angered many in the tech world. But the PayPal co-founder has found a surprising ally in Mark Zuckerberg.

The Facebook CEO sent out an internal company post defending the actions of Thiel, who is one of the social network's board members. Despite publicly attacking Trump over his position on immigration and plan to build a wall between the US and Mexico, Zuckerberg said: "We can't create a culture that says it cares about diversity and then excludes almost half the country because they back a political candidate."

"There are many reasons a person might support Trump that do not involve racism, sexism, xenophobia, or accepting sexual assault," he added.

The memo first appeared on Hacker News, where it was captured in a photo rather than a screenshot. Its authenticity has been confirmed by Facebook to The Verge. The memo seems to have been posted to the enterprise version of the social media platform - formerly known as Facebook For Work, now called Workplace - which recently came out of beta. It's not known who took the photograph.

Zuckerberg's words echo those of Y Combinator president Sam Altman. Thiel is a part-time partner at the start-up incubator, which has already seen one nonprofit stop working with it for not removing the Trump supporter.

"Thiel is a high profile supporter of Trump. I disagree with this. YC is not going to fire someone for supporting a major party nominee," Altman tweeted.

Before Theil's donation, the tech industry had donated almost $8 million to Hillary Clinton's campaign, while Donald Trump received just $300,000.