Attorney General John D. Ashcroft said yesterday that federal courts have endangered national security by ruling against the Bush administration on issues related to the war on terrorism.

In his first public remarks since he announced Tuesday that he would resign, Ashcroft told a meeting of conservative lawyers here that court decisions limiting President Bush's powers are part of "a profoundly disturbing trend" in which the judicial branch is injecting itself into matters that should be up to the executive branch.

"The danger I see here is that intrusive judicial oversight and second-guessing of presidential determinations in these critical areas can put at risk the very security of our nation in a time of war," Ashcroft said in a speech at the Federalist Society's national convention. He added later: "Our nation and our liberty will be all the more in jeopardy as the tendency for judicial encroachment and ideological micromanagement are applied to the sensitive domain of national defense."

Ashcroft did not identify specific cases, but his remarks appeared to be aimed at recent decisions rejecting arguments that the president should not be subject to significant judicial review in matters related to national security or interpretations of the Geneva Conventions.

On Monday, U.S. District Judge James Robertson ruled that the trials established to determine the guilt or innocence of military prisoners at Guantanamo Bay, Cuba, are unlawful and that the detainees may qualify as prisoners of war under the Geneva accords. The Justice Department is appealing the decision, which halted the first scheduled "military commission" for a Guantanamo Bay captive.

In June, the U.S. Supreme Court issued a landmark decision rejecting the Justice Department's position that Bush may indefinitely hold and interrogate alleged al Qaeda and Taliban members captured on the battlefield without filing charges or providing them lawyers. The court ruled that the detainees were entitled to challenge their detention in U.S. courts.

Although Ashcroft has been willing to engage in rhetorical combat throughout his nearly four-year tenure, such an open attack on the judiciary by a sitting attorney general is unusual. The comments came two days after Bush nominated his chief counsel and longtime confidant, Alberto R. Gonzales, to replace Ashcroft, who has said he will remain in the job until a successor is confirmed.

Anthony D. Romero, executive director of the American Civil Liberties Union, which has frequently criticized the attorney general, said the remarks were reminiscent of Ashcroft's appearance before the Senate Judiciary Committee in December 2001, when he said criticism of administration antiterrorism policies "only aids terrorists."

"The idea that the attorney general would show such disdain for the rulings of the federal courts, or even the Supreme Court, is remarkable," Romero said. "This indicates why we need to fundamentally rethink Mr. Ashcroft's policies and why the Senate needs to ask tough questions of Mr. Gonzales."

Ashcroft's speech focused primarily on the argument that the Constitution and its authors intended for the president to exercise broad authority in implementing federal laws and policies, including a "primary role in the making of all treaties and other international agreements for the United States." Ashcroft said the president's interpretations of those agreements "are owed deference by the courts."

Gonzales, 49, is also known as a strong proponent of executive branch authority. He is expected to be confirmed by the Senate, but not before Democrats on the Judiciary Committee question him on his role in administration policy on detentions, torture and other terrorism-related issues.

In a Federalist Society speech, Attorney General John D. Ashcroft backed broad executive power.