American comic Hasan Minhaj has responded to Netflix's decision to ban an episode of his show, the Patriot Act, in Saudi Arabia.

In a post on Twitter on Wednesday, the former Daily Show correspondent joked that the ban would be counterproductive.

"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 wrote, adding: "Let's not forget that the world's largest humanitarian crisis is happening in Yemen right now."

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 episode, Minhaj criticised Saudi Arabia over the killing of journalist Jamal Khashoggi at the Saudi consulate in Istanbul in October, as well as the country's participation in the war in Yemen.

Khashoggi, a critic of Saudi Crown Prince Mohammed bin Salman (MBS), was murdered by a Saudi hit squad in what Riyadh - after weeks of denials - said was a "rogue operation".

Senior US politicians, who have access to classified CIA information, have blamed the crown prince for the slaying.

In Yemen, tens of thousands have died as a result of Saudi and UAE-led air attacks and starvation and disease brought about by a blockade of the rebel territory imposed by the two countries.

Netflix said it pulled the episode in Saudi Arabia after receiving a complaint from authorities, who warned that it fell foul of the country's anti-cybercrime laws.

The decision to ban the episode, which was revealed by the Financial Times newspaper, sparked outrage online, with activists accusing the company of censorship and prioritising profit over principles.