The state dropped its case against a Palestinian man accused of attacking three Border Police officers after video evidence showed an officer pepper spraying and kicking the man.

Uday Bayuni, of the East Jerusalem neighborhood of Beit Hanina, spent the last three weeks in detention after border policemen said he attacked them as they were doings checks on house arrest  detainees. According to their testimonies, Bayuni headbutted one of the policemen, punching another.

However on Tuesday, Bayuni’s attorney provided the court with security camera footage which shows a Border Police officer spraying tear gas at Bayuni and then kicking him, Channel 2 news reported Wednesday night.

As a result, the public attorney dropped the charges against Bayuni, and he was released from detention.

The three Border Police officers involved were called to attend a preliminary hearing on suspicion of obstruction of justice, before a case against them will be opened. The three were suspended pending the investigation and legal proceedings, a Border Police spokesperson said.

Bayuni’s attorney, Mahmoud Rabah, said his client was lucky to have the video to prove his innocence.

“He had the benefit of objective video evidence that showed exactly what took place,” he said.