A Filipino man who was charged with using drugs and assaulting a police officer in Dubai has now been cleared of all charges.

Last July, the Filipino, 42, was arrested outside his residence in Al Quoz after police were given information that a man had purchased illegal drugs from him. When the police arrived, the Filipino resisted arrest and tried to escape by biting an Emirati cop’s hand, The National reported.

The Filipino denied assaulting the police officer and taking drugs, but was found guilty of both. A medical test confirmed he was under the influence of crystal meth and amphetamines at the time of his arrest.

In February at the Dubai Court of First Instance, the Filipino was charged with consuming drugs and assaulting a police officer. He denied the charges, but was found guilty of both.

He was sentenced to five years in prison and ordered to be deported after his jail term. The man must also pay a fine of 20,000 dirhams.

On Monday, the Court of Appeals reversed the primary ruling and the Filipino was acquitted due to a lack of evidence.

Read: Man charged with drugs, police assault in Dubai