Crowds of protesters were violently dispersed on June 3 by men in military fatigues, who stormed a weeks-long protest camp outside the army headquarters in Khartoum where they had camped to demand that the generals step down.
Internet on mobile phones and fixed land connections was cut across Sudan by the ruling military council, with users saying it was done to prevent further mobilisation of protesters.
Lawyer Abdelazim al-Hassan said he had filed a petition against the blockade, and on Sunday a court in Khartoum ordered that the services be resumed.
"I had filed the case 10 days ago and Judge Awatef Abdellatiff ordered the telecommunications department to resume the internet services immediately," Hassan told AFP. Authorities can appeal the decision.
For the generals the internet and social media are a threat.
"Regarding social media, we see during this period that it represents a threat for the security of the country and we will not allow that," military council spokesman General Shamseddine Kabbashi said earlier this month.
The internet blockade was an attempt to quell new protests against the generals, who have so far resisted to hand power to a civilian administration as demanded by demonstrators, protest leaders say.
Tens of thousands of protesters were mobilised through online social media apps during the months-long campaign against the now ousted leader Omar al-Bashir.
Protest leaders have resorted to neighbourhood campaigns to keep their movement alive, with activists mobilising supporters in night-time gatherings, witnesses said.
Follow us on Twitter: @The_NewArab