Brazilian Judge Xavier de Souza has ordered that a suspension of WhatsApp be lifted.
The judge said the service should be re-instated immediately.
A court had ordered the service be suspended for 48 hours on December 17 for failing to comply with a court order to provide investigators with information relating to a criminal court case.
Judge Xavier de Souza said it was “not reasonable that millions of users be affected by the inertia of the company”.
Brazilians had complained bitterly on social media about the suspension of WhatsApp, which is a hugely popular app used by many to communicate with family, friends and colleagues both inside of Brazil and abroad.
According to the TechCrunch website, 93% internet population use WhatsApp, with many young and poor Brazilians taking advantage of its free text message and internet telephone service.
Within hours of the suspension being coming into force, the hashtag #Nessas48HorasEuVou (#Inthese48hoursIwill) began trending on Twitter, with Brazilians joking about all the things they would do during the suspension.
The suspension also caused anger at Facebook, which owns WhatsApp.
Mark Zuckerberg wrote on his Facebook page: “I am stunned that our efforts to protect people’s data would result in such an extreme decision by a single judge to punish every person in Brazil who uses WhatsApp.”
The suspension was ordered after WhatsApp failed to comply with a court order.
The court which ordered the suspension gave little detail, apart from saying that the order related to a criminal case.
Brazilian media said WhatsApp had been asked to provide details of communication by a suspected gang member who is alleged to have used WhatsApp to organize illegal activity.
Separately from the court case, Brazilian phone companies have urged the government to restrict the use of free voice-over-internet services offered through WhatsApp.
The phone companies argue that the rise of WhatsApp has damaged their businesses.
Meanwhile other messaging services said they had benefited from the temporary absence of WhatsApp.
One such company, Telegram, said on Twitter that more than 1.5 million Brazilian users had joined up since the court order was handed down.