Comedian Hasan Minhaj attends Build to discuss his new Netflix special "Hasan Minhaj: Homecoming King" on May 25, 2017 in New York City.

Netflix has pulled an episode of "Patriot Act with Hasan Minhaj" in Saudi Arabia at the request of the country's government.

The U.S. streaming service took down the episode, entitled "Saudi Arabia," following a legal request from the Saudi Communications and Information Technology Commission, as it allegedly violated anti-cybercrime law.

The news was first reported by the Financial Times, and later confirmed to CNBC.

A Netflix spokesperson told CNBC: "We strongly support artistic freedom worldwide and only removed this episode in Saudi Arabia after we had received a valid legal request — and to comply with local law."

The firm stressed that Saudi Arabia made a "legal request" and that Netflix's response was consistent with how other U.S.-based companies operate.

Saudi Arabia's IT regulator was not immediately available for comment when contacted by CNBC.

The episode in question takes aim at the killing of Jamal Khashoggi, a critic of the Saudi regime, as well as Crown Prince Mohammed Bin Salman. Minhaj, the titular U.S. comedian who hosts the series, says in the episode that "now would be a good time to reassess our relationship with Saudi Arabia."