Coursera, one of the leading providers of massive open online courses (MOOCs) has cut off access for students in Iran, Cuba, and Sudan after learning that it was in violation of US trade sanctions.

The interpretation of export control regulations for MOOCs has been unclear until now, Coursera says, and the startup believed the classes would not be restricted. That changed when executives were informed that the service was in fact noncompliant with the law.

At first, Coursera also cut off students in Syria. Access was restored there after the company found out that it falls under an exemption for nongovernmental organizations.

The number of students who lost access is less than 2,000

"Since last week, we've unfortunately had to block logins from 2,000 IP addresses in US sanctioned countries, although we're happy to report that Syrian students have now regained access," Coursera co-founder Andrew Ng says in an email. "This is an extremely important issue to us, and we're doing all we can, in partnership with the State Department, to free up learning to students everywhere."

The number of students who are cut off now is less than 2,000, because some of those students were Syrian and others may be logging on from multiple devices. However, the move strikes some as cruel and unnecessary. Coursera classes, which are offered by top universities in the US and around the world, range from chemistry to theology and are praised for opening up access to education. The classes are free, although some universities will issue a verified certificate after completion of a class for a small fee starting at $39.

Coursera now has to apply for licenses before it can reopen classes for students in Iran, Cuba, and Sudan.

The State Department has been supportive of Coursera in the past, even partnering with the startup to offer courses through "learning hubs" around the world. Blocking Iranians from using the educational service is especially ironic given the pressure that the US has put on Iran to open up its internet and give its citizens "a universal right to access information, and to freely assemble online."