A judge in a London court on Monday found activist Muhammad Rabbani guilty of a terrorism offense because he refused to turn over his passwords to police during a border search.

Rabbani, the 36-year-old international director of British advocacy group Cage, was arrested in November at London’s Heathrow Airport. Police had demanded he provide his phone and laptop passwords during an “examination” that was carried out under Schedule 7 of the Terrorism Act, a broad power authorities can use to interrogate and detain people in border areas without requiring any suspicion of wrongdoing.

Rabbani said he could not provide access to his devices because they contained confidential information, provided to him by one of Cage’s clients, about alleged acts of U.S. torture. The group, which was founded in 2003 to raise awareness about the plight of prisoners held at Guantánamo Bay, was planning to use the information in a pending lawsuit against the U.S. government.

At the end of a quick one-day trial, Judge Emma Arbuthnot at Westminster Magistrates Court ruled that Rabbani had willfully obstructed police when he declined to hand over his passwords. Rabbani avoided a possible three-month jail term and was instead handed a 12-month conditional discharge and told he must pay court costs of £620 ($835). This means a Terrorism Act offense will be recorded on his criminal record. But as long as he does not re-offend within the 12-month period, no further action will be taken against him.

Rabbani said in a statement after the verdict that the judgment highlighted the “absurdity of the Schedule 7 law” and called for it to be reformed. “If privacy and confidentiality are crimes, then the law stands condemned,” he said. “They accept that at no point was I under suspicion, and that ultimately this was a matter of having been profiled at a port. … Schedule 7 actively discriminates, and this will hopefully be the start of a number of legal challenges as more people take courage to come forward.”

During the trial, Rabbani’s lawyer, Henry Blaxland, questioned three police officers who were responsible for carrying out the search at the airport. The most senior officer acknowledged that Rabbani had not been randomly stopped and was instead deliberately targeted for reasons that were not disclosed. Prior to the trial, Rabbani had told The Intercept he believed the authorities may have wanted to obtain a copy of the information about the alleged torture, which was provided to him by a contact in the Middle East. He had been searched on several prior occasions, he said, but never before had police seemed so determined to gain access to his electronic devices.

Schedule 7 is supposed to be used solely to determine whether a person is directly involved in the “commission, preparation, or instigation of acts of terrorism.” In 2013, however, the power was used to detain David Miranda, the partner of Intercept co-founding editor Glenn Greenwald, in an effort to impede reporting on documents leaked by National Security Agency whistleblower Edward Snowden. Miranda’s detention caused controversy in the U.K., and aspects of Schedule 7 were subsequently changed. Police were issued with a revised code of practice that told them they must not review or copy information that they have grounds to believe is attorney-client privileged, journalistic material, or another kind of information held in confidence, which a person has “acquired or created in the course of any trade, business, profession, or other occupation.”

Rabbani had argued his electronic devices should have been protected under the latter category, as they contained confidential information related to his work. The judge said that Rabbani did not make this clear to the officers who initially interrogated him, but did say so later in a prepared statement following his arrest. She described Rabbani as “of good character,” acknowledged he was “trying to protect confidential material on his devices,” and noted that “the importance of passwords and PIN numbers in the 21st century cannot be overstated.” However, she still concluded that his “decision not to provide the information when requested by the examining officers” amounted to “a wilful obstruction of the lawful examination in the circumstances.”

Dean Haydon, head of the Counter Terrorism Command at London’s Metropolitan Police, said the outcome was an “important one” for the authorities. “It’s crucial that police are able to use the legislation that exists to help keep the public safe,” he said in a statement. “Schedule 7 of the Terrorism Act 2000 is a vital tool in the fight against terrorism and we are committed to ensuring the power is used appropriately and proportionately, as it was in this case. The Met has retained Rabbani’s phone and laptop and is continuing its efforts to examine the contents.”

A spokesperson for Cage said the group was considering whether it would appeal the verdict.

Top photo: The international director of Cage, Muhammad Rabbani, left, arrives at Westminster Magistrates’ Court in London on Sept. 25, 2017, for his trial, after being accused of refusing to reveal his phone and computer passwords at Heathrow Airport last year.