American comedian Hasan Minhaj spoke out Wednesday after Netflix pulled an episode of his "Patriot Act" series in Saudi Arabia that criticized the kingdom's crown prince. Officials in the kingdom reportedly complained about the episode.

"Clearly, the best way to stop people from watching something is to ban it, make it trend online, and then leave it up on YouTube," Minhaj tweeted.

He then called for donations to help people in war-torn Yemen.

Get Breaking News Delivered to Your Inbox

"Let's not forget that the world's largest humanitarian crisis is happening in Yemen right now," he wrote, linking to an International Rescue Committee donation page.

Clearly, the best way to stop people from watching something is to ban it, make it trend online, and then leave it up on YouTube. Let’s not forget that the world’s largest humanitarian crisis is happening in Yemen right now. Please donate: https://t.co/znMP8vyJma https://t.co/t2VUDhhIdB — Hasan Minhaj (@hasanminhaj) January 2, 2019

In the second episode of "Patriot Act," released Oct. 28, Minhaj criticized Saudi Crown Prince Mohammed bin Salman over the killing of Saudi writer Jamal Khashoggi and the Saudi-led coalition at war in Yemen.

The war began in March 2015 after Houthi rebels occupied northern Yemen, forcing the government of Yemeni President Abed Rabbo Mansour Hadi into exile. After the rebels began pushing farther south, Saudi Arabia and other Persian Gulf states formed a coalition to take on the Houthis.

The war has since killed thousands of civilians and pushed millions to the brink of famine.

In the roughly 18-minute now-censored "Patriot Act" monologue, Minhaj also mentions the ruling Al Saud family and its vast wealth, saying: "Saudi Arabia is crazy. One giant family controls everything."

The kingdom's Communication and Information Technology Commission said the episode violated the Anti-Cyber Crime Law in Saudi Arabia. The law states that "production, preparation, transmission, or storage of material impinging on public order, religious values, public morals, and privacy, through the information network or computers" is a crime punishable by up to five years in prison and a fine, according to rights group Amnesty International.

Netflix said in a statement Wednesday the episode was removed from the kingdom as a result of a legal request from authorities and not due to its content.

"We strongly support artistic freedom worldwide and removed this episode only in Saudi Arabia after we had received a valid legal demand from the government — and to comply with local law," the streaming giant said.

Amnesty International, however, said Saudi Arabia's censorship of Netflix is "further proof of a relentless crackdown on freedom of expression."