A British Muslim man who claimed he was discriminated against after being stopped and questioned by police under terrorism laws has won the right to challenge the secret intelligence used against him.

The case could have far-reaching implications for the security services who use undisclosed intelligence to conduct tens of thousands of random stops at airports each year.

Shayab Miah, from Southampton, was stopped and detained for an hour by counter-terrorism police at Heathrow Airport after returning from India in August 2009.

Later Mr Miah, who was released without further action, complained to the Metropolitan Police that his detention was not based on a random stop but motivated by religious discrimination.

It was only after he complained that it emerged the security services had placed a 'tab' on his passport which was activated whenever he left or entered the country, although the police refused to say on what basis he was being targeted.

Mr Miah appealed to the Independent Police Complaints Commission (IPCC) who upheld the Met's original rejection of his complaint.

But last week three Court of Appeal judges ordered the IPCC and the police to reconsider the complaint by taking full account of all the secret intelligence in his case.