Diego Dzodan, Facebook's vice president for Latin America, spent the night in jail before he was set free on Wednesday, March 2, following a grant to his appeal that overrules a lower court's decision to take him into custody.

The social networking giant's executive was detained from grounds stemming from an impasse reached between the Brazilian government and Facebook, Fortune reports. The law enforcers in the country are asking for access to WhatsApp messages that may help shed light on their ongoing investigation involving drug traffickers.

Meanwhile, Facebook reiterated that while they will continue to cooperate and "address questions Brazilian authorities may have," they are also firm on their commitment to uphold user privacy. However, even if the company soften their stand on the matter, Facebook also claims that they do not hold the key to decode the WhatsApp messages.

According to a Reuters report, the messaging platform owned by Facebook has started to self-regulate itself back in 2014 and utilized an end-to-end encryption technology that would deny even the company itself from getting access to messaging content.

"They are using technology to try to take themselves out of the surveillance business," said Christopher Soghoian, principal technologist from the American Civil Liberties Union.

The judge from Brazil ordered the arrest Dzodan following another decision to fine Facebook 1 million reais ($250,000) after the comapny failed to cooperate with the law enforcements' call to get full access to WhatsApp messages.

The messaging app, which was acquired by Facebook in 2014, was temporarily closed in Brazil in 2015 due to non-compliance in the investigation of the confidential drug-trafficking case. Facebook founder Mark Zuckerberg expressed his disappointment at the local court's decision by saying that it's "a sad day for Brazil," Fortune noted.

Facebook is not the only tech company currently dealing with such run-in with the government. Apple also remains adamant on their stand to maintain the privacy of their customers after refusing the call from the United States government to develop a way to unlock the iPhone of one of the San Bernardino attackers.

Meanwhile, Facebook has already released a statement regarding Dzodan's arrest and eventual release.

"Diego's detention was an extreme, disproportionate measure, and we are pleased to see the court in Sergipe issue an injunction ordering his release," a spokesperson from the company said via Fortune. "Arresting people with no connection to a pending law enforcement investigation is a capricious step and we are concerned about the effects for people of Brazil and innovation in the country."