WASHINGTON - The Justice Department released two decade-old memos Friday night, offering the fullest public airing to date of the Bush administration's legal justification for the warrantless wiretapping of Americans' phone calls and e-mails - a program that began in secret after the 2001 terrorist attacks.

The broad outlines of the argument - that the president has inherent constitutional power to monitor Americans' communications without a warrant in a time of war - were known, but the sweep of the reasoning becomes even clearer in the memos written by then-Assistant Attorney General Jack Goldsmith, who was head of President George W. Bush's Office of Legal Counsel.

"We conclude only that when the nation has been thrust into an armed conflict by a foreign attack on the United States and the president determines in his role as commander in chief . . . that it is essential for defense against a further foreign attack to use the [wiretapping] capabilities of the [National Security Agency] within the United States, he has inherent constitutional authority" to order warrantless wiretapping - "an authority that Congress cannot curtail," Goldsmith wrote in a redacted memo dated May 6, 2004.

The program enabled the NSA to collect communications on U.S. soil when at least one party was believed to be a member of al-Qaeda or an al-Qaeda affiliate, and at least one end of the communication was overseas.

Its existence was revealed in 2005 by the New York Times, setting off great controversy, and the program was finally brought under court oversight in 2007.

The American Civil Liberties Union obtained the memos through a Freedom of Information Act lawsuit.

Goldsmith argued that Congress' 2001 Authorization for the Use of Military Force (AUMF) passed shortly after the al-Qaeda attacks on the United States provided "express authority" for the warrantless program. In a second memo, dated July 16, 2004, Goldsmith argued that a Supreme Court decision reached weeks earlier, involving a U.S. citizen named Yaser Esam Hamdi captured on the battlefield in Afghanistan, bolstered the reasoning of his first.