A group of GOP senators wrote to Twitter CEO Jack Dorsey on Thursday that the company would be subject to U.S. sanctions law if it did not end its service for sanctioned Iranian leaders, including Supreme Leader of the Islamic Republic Ayatollah Ali Khamenei and Iranian Foreign Minister Javad Zarif.

"While the First Amendment protects the free speech rights of Americans — and Twitter should not be censoring the political speech of Americans — the Ayatollah enjoys zero protection from the United States Bill of Rights," Sens. Ted Cruz, R-Texas, Tom Cotton, R-Ark., Marsha Blackburn, R-Tenn., and Marco Rubio, R-Fla., wrote.

"And, as the leader of the world's leading state sponsor of terrorism — directly responsible for the murder of hundreds of U.S. citizens — the Ayatollah and any American companies providing him assistance are entirely subject to U.S. sanctions laws," they wrote.

The senators say that an exception for internet-based communications services created by the Obama administration in 2014 would not apply when the person receiving the service has been designated to a special list kept by the Treasury Department, as is the case for Khamenei and Zarif.

Twitter declined to comment on the letter.

The company has generally taken a fairly hands-off approach when it comes to moderating world leaders on its platform. It recently released a policy about how it would handle abusive tweets by world leaders, which would normally be removed when coming from any other Twitter user. The company said that in these cases, it would put a notice on tweets from world leaders that says the content violates its standards. Users will be allowed to click through to view the tweet, a decision Twitter said it made because it believes messages from world leaders are still newsworthy and in the public interest. This feature has not yet been used since the policy was announced in June.

The four senators who signed the letter have been vocal about other tech issues including political bias. Cruz and Blackburn have been among the most outspoken on political bias, claiming companies like Twitter are biased in the content they allow and take down as well as what their algorithms tend to surface.

Twitter had removed a Blackburn campaign video in 2017 where she claimed Planned Parenthood sold "baby body parts" but later reversed its decision following blowback.

Cruz and Rubio are members of the Senate Committee on Foreign Relations, Cotton is on the Senate Intelligence Committee and Blackburn is on the Judiciary Committee, where she leads the Tech Task Force.

Subscribe to CNBC on YouTube.

WATCH: Twitter announces new plan to tackle manipulated content