A judge has shut down WhatsApp for 72 hours in Brazil as a penalty for failing to hand over data requested as part of a drug trafficking investigation.

All messages and multimedia sent via the popular messaging app are now encrypted.

Judge Marcel Maia Montalvao in the northeastern state of Sergipe ordered the five main mobile phone providers in Latin America's largest country - Telefonica Brasil SA, America Movil SAB's Claro, TIM Participacoes SA, Oi SA and Nextel Participacoes SA - to block access to WhatsApp from Monday afternoon.

WhatsApp founder and CEO Jan Koum posted a statement on his Facebook page.

"Yet again millions of innocent Brazilians are being punished because a court wants WhatsApp to turn over information we repeatedly said we don't have.

"Not only do we encrypt messages end-to-end on WhatsApp to keep people's information safe and secure, we also don't keep your chat history on our servers.

“When you send an end-to-end encrypted message, no one else can read it - not even us."

In March Judge Montalvao imprisoned a Facebook executive in the country for failing to comply with an attempted block on WhatsApp. He was later freed.

In December another judge in São Paulo state ordered that WhatsApp be shut down for 48 hours after owners Facebook failed to comply with an order, although another court cut that suspension short.