The Bush administration routinely bypassed or overruled Pentagon experts on international law and the Geneva convention to construct a sweeping legal justification for harsh tactics in the war on terror, the Guardian has learnt.

In one instance, President George Bush's military order of November 13 2001, which denies prisoner-of-war status to captives from Afghanistan and allows their detention without charge or access to a lawyer at Guantánamo, was issued without any consultations with Pentagon lawyers, a former Pentagon official said.

The revelation follows reports in the US press this week of a Pentagon memo that argued that Mr Bush was not bound by laws against torture, and that interrogators who torture detainees at Guantánamo cannot be prosecuted.

The military order issued by Mr Bush in November 2001 was the first such directive since the second world war, and the administration's failure to seek the Pentagon's advice on what would emerge as the entire system of detention at Guantánamo surprised Pentagon officials.

"That came like a bolt from the blue," the official said. "Neither I nor anyone I knew had any insight, any advance knowledge, or any opportunity to comment on the president's military order."

The Pentagon general counsel, William James Haynes, was also left out of the loop, another official said.

Meanwhile, the Bush administration fought off allegations that it had manipulated the law to justify torture of detainees at Guantánamo, with the attorney general, John Ashcroft, pressed repeatedly at Senate committee hearings yesterday to say whether Mr Bush had ever intervened on the treatment of detainees.

However, the Wall Street Journal and other newspapers this week obtained copies of a Pentagon report which concluded that some methods of torture were legal, including sleep deprivation and so-called stress positions. The April 2003 report said Mr Bush had the constitutional power to authorise torture - which is against US law - if American lives were in danger.

Mr Ashcroft denied the president had issued an order giving interrogators immunity from prosecution. "The president has issued no such order," he said, but he was adamant that he would not release documents on the issue.

The debate on the Pentagon memo is unwelcome for the Bush administration, which had hoped it had put the scandal about prisoner abuse to rest.

However, Senator Edward Kennedy said yesterday that the Pentagon memo and other such rulings laid the legal foundations for the abuse. "We know when we have these kinds of orders what happens: we get the stress test, we get the use of dogs, we get the forced nakedness that we've all seen and we get the hooding," Mr Kennedy said, holding up pictures from Abu Ghraib prison.

Mr Ashcroft replied: "Let me completely reject the notion that anything that this president has done or the justice department has done has directly resulted in the kind of atrocity which were cited. That is false."

The Pentagon memo was familiar to the former official who said military and civilian lawyers tried to "push back" some of the more extreme interrogation methods.

He and another senior Pentagon official described frequent clashes of opinion since the 9/11 terror attacks, with career military lawyers disturbed by the efforts of political appointees to grant sweeping powers to the administration.