The "war on terror" had barely begun when senior ministers in the Labour government became aware that it was to be a harsh and brutal affair, involving fundamental breaches of international human rights law, it was revealed today.

Previously classified documents, disclosed in the high court, show that the government was warned repeatedly in January 2002 that British citizens were possibly being tortured after capture by US forces in Afghanistan, that the US was planning to hold some indefinitely without trial, and that British military lawyers were complaining about breaches of the Geneva conventions.

While the heavily redacted documents – released in civil proceedings brought by six former Guantánamo inmates – betray British concern about American conduct, they also appear to show that diplomats, civil servants and government lawyers were anxious to find ways to remain, in the words of Tony Blair, "standing shoulder to shoulder" with the US.

A six-page memo by Tom McKane, a senior official attached to the Cabinet Office, and sent to David Manning, Blair's senior foreign policy adviser, names three British citizens held in Afghanistan and notes that each was "possibly being tortured in part 3 jail Kabul". McKane adds that MI5 and MI6 had begun questioning detainees in Afghanistan, and says: "The US has begun transferring detainees they are holding in Afghanistan to Guantánamo Bay in Cuba. We have raised no objection in principle to the transfer of UK nationals."

Four days later, a Foreign Office note to Downing Street says MI5 and MI6 officers have arrived in Guantánamo to question British detainees, and warns: "This will continue to be a difficult issue to handle, both in procedural and legal terms with the US and in handling parliament and the media here."

At the foot of the letter, Blair has written: "The key is to find out how they are being treated. Though I was initially sceptical about claims of torture, we must make it clear to the US that any such action would be totally unacceptable and v quickly establish that it isn't happening."

Evidence has since emerged that the government knew the US was mistreating and torturing UK nationals and residents in January 2002 and for years afterwards, but did not seriously protest about it. Other evidence, notably in the case of Binyam Mohamed, an Ethiopian-born British resident, shows that MI5 co-operated with the CIA while that agency was indulging in mistreatment and torture.

Also among the released documents is a letter to London from the British embassy in Washington, dated 24 October, which reflects a growing realisation that the US was considering detaining people captured in Afghanistan for very long periods, and an understanding that it would be difficult to defend this as lawful.

Heavily censored, the letter shows that within weeks of the 9/11 attacks, the US and UK governments saw that the longer they could claim they were still waging a form of war, the longer they might be able to detain individuals without trial. They were aware the argument would wear thin if hostilities should appear to be over.

The author of the letter – whose identity has been redacted – writes: "As long as the war against terrorism in the widest sense continued, the US/UK would have rights to continue to detain those they had been fighting against (even if the fighting in Afghanistan itself were over). [Redacted] conceded that the strength of such a case would depend on the plausibility of the argument that the war was continuing."

One document, a 19-page appendix to a Cabinet briefing paper dated 14 January 2002 headed "UK nationals held in Afghanistan", is redacted in its entirety.

Another details the concerns of a British army lawyer in Kuwait who visited Bagram, the airfield north of Kabul where many detainees were held. "From my visit to Bagram 10/11 Jan and watching the reception of the 80 plus prisoners, it would seem that this detainee issue is one that has the potential to reflect badly on the US/Coalition … the US treatment of the prisoners could be judged to be [redacted]". The Red Cross had been "allowed to look in" but denied access. "It is clear that the US is pushed logistically, but my understanding of the Geneva convention is that this is no excuse."