WASHINGTON - Former vice presidential aide I. Lewis "Scooter" Libby was eager to make public that the CIA, not Vice President Cheney, had sent a former ambassador to check on Iraq's efforts to obtain nuclear material, a former agency executive testified yesterday.

Robert Grenier, the CIA's former Iraq mission manager, appeared as a government witness at Libby's trial on charges of obstruction and lying. He testified he told Libby that the idea of sending Joseph Wilson to Niger was the brainchild of Wilson's wife, Valerie Plame Wilson, who worked in the CIA office that sent the former envoy in 2002.

A year later, Joseph Wilson became a leading critic of the war, based on what he learned in Niger.

Ultimately, Grenier's testimony could help prosecutor Patrick Fitzgerald establish a motive for Libby to have confirmed Valerie Wilson's identity and employer to reporters in 2003, which Libby denies doing.

But defense attorney William Jeffress quickly questioned how Grenier's memory had managed to improve substantially since he talked to investigators in 2003-05. The defense has attacked government witnesses for inconsistencies in their statements during Fitzgerald's investigation into the leak of Valerie Wilson's name.

Such attacks on memory set the stage for the defense argument that Libby did not lie to investigators but merely had his own memory lapse.

Valerie Wilson's identity and her role in her husband's trip were leaked to columnist Robert Novak in July 2003, shortly after Joseph Wilson publicly criticized Bush for portraying Iraq as trying to buy uranium in Niger - months after the former ambassador told the government the story was untrue.

Grenier said Libby called him June 11, 2003, to ask about the Wilson mission and sounded upset that Cheney's office was being blamed for sending Wilson. Libby attorney Theodore Wells has said that Cheney was angry at Wilson's suggestion that the vice president had been behind the trip, should have gotten Wilson's report, and may have suppressed it.

Later that day, Grenier said, he told Libby that it was not only Cheney's office "driving the Wilson trip but also inquiries from State and Defense."

"Mr. Libby asked if the CIA was willing to reveal that publicly," Grenier testified. He said he checked, told Libby that the CIA agreed to the release, and put the CIA's spokesman on the phone with a Cheney press officer to work out details.

Grenier testified that he also told Libby that Wilson's wife worked in the CIA unit that sent the former ambassador to Niger, and "that's where the idea came from," because she knew that her husband had contacts in the African country.

On cross-examination, Jeffress got Grenier to acknowledge that he had been unable to recall for the FBI in December 2003 whether he had told Libby about Valerie Wilson's CIA job, and that he was still uncertain when he testified to the grand jury in January 2004 and July 2005.

Grenier's explanation - elicited earlier by prosecutor Peter Zeidenberg in anticipation of Jeffress' attack - was that "I kept going over it again and again in my mind" and remembered that after speaking with Libby, "I felt guilty I said too much."

Grenier said his guilt arose from mentioning Valerie Wilson's work at the CIA.

"We guard identities pretty closely," Grenier said. "In the CIA, we have a habit that if we don't need to say something, we normally don't."