The Indian region of Kashmir has had most Internet service blacked out since August. The government of Narendra Modi says the online blackout is a necessary security measure in the face of growing unrest in the region triggered by a change in Kashmir's status under the Indian constitution. (Kashmir's status within India has been a topic of controversy for decades.)

"The government says it was necessary to block the Internet to stop agitators orchestrating mass, potentially violent, protests against its decision to revoke Kashmir’s special status," Reuters reports.

But on Friday, India's highest court rejected the government's rationale, arguing that the blackout violated Indian telecommunications laws.

“Freedom of Internet access is a fundamental right,” justice N.V. Ramana said.

The Kashmir blackout isn't the only time Modi's government has restricted Internet access in the face of protests against government policies, Reuters notes. But the 150-day blackout in Kashmir is the longest ever in India—or any other democracy.

The blackout has imposed significant hardships on area residents. People in Kashmir have found it difficult to communicate with friends and family elsewhere. And Kashmiri firms that do business outside the region have been hit particularly hard.

The Supreme Court ruling won't lead to an immediate restoration of Internet access in Kashmir, however. Instead, India's highest court has given the government a week to revise its policies. The court also required the government to be more transparent about its Internet shutdown orders.