The international director of British campaign group Cage has been charged under the Terrorism Act for refusing to give police his computer password, the organisation has said.

Muhammad Rabbani was detained at Heathrow Airport under counter-terrorism stop and search powers last November on his return to the UK from one of the Gulf states.

The 35-year-old, from London, said he handed over his laptop and mobile phone but refused to provide passwords as he was carrying "crucial evidence taken from a torture survivor and did not have permission from the client to share the information".

He says the alleged torture case involved "US intelligence agencies".

Rabbani's refusal led him to be arrested and released on bail.

On Wednesday (17 May), he attended a London police station where Cage said he was charged with "wilful obstruction and seeking to frustrate" a search under schedule 7 of the 2000 Terrorism Act.

Rabbani, who views the allegations against him as a test privacy-versus-surveillance case, said he intends to fight the charge when he appears at Westminster Magistrates' Court on 20 June.

"I am innocent of these charges that have serious implications for journalists, lawyers and human rights," he said.

Cage, which describes itself as an advocacy group "working to empower communities impacted by the War on Terror", has campaigned against schedule 7 powers, which allow border police to search travellers without suspicion to determine if they are involved in terrorism.

They also allow police to search and copy the contents of electronic devices.

Cage said the sweeping powers led to "constant harassment" of Muslims at airports, with Rabbani, who investigates torture allegations, saying he had been detained under the legislation at least 20 times.

A post on the Cage website said: "He has never previously provided his password when requested to do so. However this was the first time he was arrested for not complying.

"He believes it is because the material on his laptop included documentation relating to a legal case being built around alleged torture involving US intelligence agencies.

"Rabbani pleaded that he could not disclose that material without the express consent of the alleged victim of torture. Like those before him, Rabbani is willing to go to prison for his principles.

"If Rabbani is charged today and jailed, we should not only support him but celebrate his arrest as it may prove to be a watershed movement for civil rights in Britain."

Around 50,000 travellers at UK border ports are stopped each year, the organisation said, with the vast majority facing no further action.

Several privacy advocates and civil liberties groups have spoken out against schedule 7 powers, with Liberty describing them as "breathtakingly broad and intrusive" and in violation of the European Convention on Human Rights.

The group said in 2010/11, 45% of those detained under schedule 7 were Asian; 21% were black; and only 8% were white.

In 2013, the partner of journalist Glenn Greenwald, David Miranda, was stopped at Heathrow for nine hours under the same legislation in the wake of the Edward Snowden case.

Miranda launched a partially successful legal challenge, with the Court of Appeal upholding the lawfulness of the detention but ruling that stop powers under schedule 7 lacked sufficient legal safeguards for journalistic material.

The case against Rabbani comes as momentum gathers for the "Fly Don't Spy" campaign in the United States, which is fighting proposals by the Trump administration to require travellers entering the country to hand over social media account passwords as a condition of entry.