In reply to Neil Williams:
The specific legislation is Sched 7 TACT.
Under this legislation they could arrest a passenger for failing to cooperate. This includes not showing ID (or providing some kind of verifiable information that would allow them confirm you're identity), failing to answer questions or provide pass codes for IT equipment. It's very Orwellian and very controversial.
The alternative to arrest, as you've said, is for them to detain a passenger in order to carry out enquiries to establish his identity. The detention period can last for 9 hours max.
It's pretty much down to the passenger to decide how inconvenient the whole process is, a 5 second flash of a photo drivers licences VS hours spend sitting around while the special branch police have their coffee break.
They do have to tell you that they're police officers, but they don't have to show a warrant card or provide any information about their identity other than a reference number. Most carry identity cards with a photo and a number, others use false identities. This is a safeguard against being identified by terrorists.
All of this only applies to Special Branch and only at airports, the North/South Irish border and international ferry and train ports. The power extended into the arrival ports of the destination country - meaning that British police are based in France, at Euro Star terminals.
Post edited at 16:32