A Brazilian court on Tuesday agreed to end its blockage of the smartphone messaging service WhatsApp after suspending it for failing to surrender user data, the company said.

WhatsApp, owned by Facebook, appealed against the shutdown imposed on the company on Monday for not handing over information requested in a drug trafficking investigation.

The court rejected a first appeal filed late on Monday.

But a second appeal was upheld and "the service should be freed up in a short time," a spokesman for WhatsApp told AFP early on Tuesday afternoon.

The shutdown angered users reliant on the free app in Brazil, where cell phone fees for texting and calls are among the highest in the world.

Rejecting the first appeal, the court said in a statement that WhatsApp was "playing down the importance of an investigation into members of a criminal organization who use the application."

It accused WhatsApp of "covering up the seriousness of the crime allegedly committed -- drug trafficking -- with the argument of defending users' right to privacy."

WhatsApp had insisted it was cooperating with the investigation. Facebook has said it has no technical means for complying with such requests.

The court order from Judge Marcel Montalvao in the northeastern town of Lagarto shut down WhatsApp from 2:00 pm (1700 GMT) on Monday, ordering the cut-off for 72 hours.

The free app is installed on nine in 10 smartphones in the country. The company says it has more than 100 million users in Brazil.