Enron Corp. founder Kenneth Lay worried in 2001 that the company's mounting financial problems would jeopardize its credit rating and inquired about managing its accounting to avoid a downgrade, a former Enron treasurer testified Wednesday.

Former Treasurer Ben Glisan Jr. testified that Lay assigned him to feel out credit-rating agencies about how large some required accounting writedowns could be without jeopardizing Enron's rating.

"That's backwards," Glisan told jurors Wednesday in the fraud and conspiracy trial of Lay and former Enron CEO Jeffrey Skilling. "What should occur is we should take the charges that we needed to take and then deal with the consequences."

Glisan said Enron, a reputed powerhouse, was actually weak and faced multibillion-dollar losses and writedowns on assets that either performed poorly or were overvalued.

But if credit analysts knew of such looming problems, they might downgrade Enron's investment-grade credit rating -- which would alert Wall Street that the company had serious troubles. A downgrade would make it more expensive for Enron to borrow millions to support its trading operation and could force debt repayment when little cash was available.

Glisan said his gentle inquiries with credit-rating agencies revealed that Enron could report a charge of up to $1 billion without prompting a downgrade.

The company announced that amount -- not the multibillion dollars in actual charges that executives had discussed internally -- when it released third-quarter 2001 earnings, with Lay telling analysts that all the financial cards were on the table and core businesses were strong.

Glisan, 40, the only ex-Enron executive to go to prison after pleading guilty, took the witness stand late Tuesday on furlough from prison, unsmiling but confident as he said that Enron was weak in August 2001 and that Lay and Skilling knew it.

Yet Glisan said that on Aug. 14, 2001 -- the day Skilling abruptly resigned as chief executive officer and less than four months before Enron filed for bankruptcy protection -- the top executives were upbeat with analysts.

"The company is in great shape," Skilling said in an audio clip played for jurors of a conference call that day.

"The company is probably in the strongest and best shape it's ever been in," Lay added. "The company is strong and has tremendous momentum."

"Was it?" prosecutor Kathryn Ruemmler asked Glisan.

"No," Glisan replied.

By the summer of 2001, Glisan said, Enron wasn't generating much cash flow, subsidiaries were floundering and a profitable trading operation was "taking on enormous risks."

"The company itself was struggling," said Glisan, who pleaded guilty to a charge of conspiracy to commit securities and wire fraud and is about halfway through a five-year prison term.

Outside the jury's presence Tuesday, he invoked the Fifth Amendment when asked if he committed other crimes while at Enron, then was presented with an immunity agreement dated Monday.

Lay, as has been customary in the trial now in its eighth week, took extensive notes, even at times turning his back on the witness and writing on a legal pad at the defense table. Skilling, facing Glisan, scribbled only a brief occasional note.

It did not appear Glisan made eye contact with either man, and spoke more directly to Ruemmler, who asked if Skilling and Lay were aware of the financial problems.

"Yes, they were," he said, adding that the difficulties became "significantly worse" in the weeks after Skilling departed for what he said at the time were personal reasons.

Glisan said despite the problems, it was important to protect Enron's credit rating so pressure always was on to meet earnings targets and analyst expectations.

Lead Lay lawyer Michael Ramsey described Glisan's salvoes to Ruemmler's opening questions as rehearsed.

"What you're seeing up here is a scripted ventriloquist act," Ramsey said.

Glisan is a key witness and likely the last major government witness during its case-in-chief against Lay and Skilling, who claim there was no fraud at Enron and negative publicity coupled with diminished market confidence fueled the company's descent into bankruptcy protection.

He has been in prison since September 2003 when he admitted to creating four fragile financial structures known as Raptors he said Enron used to house assets and investments and to hide losses, making the company appear more successful than it was. Prosecutors contend Lay and Skilling knew about the Raptors and how they were used.

Earlier Tuesday, Ronald Barone, a managing director at debt rating agency Standard & Poor's, said Lay likely headed off a possible reduction in Enron's credit rating with an unusual call to him in October 2001 in which he acknowledged the company's deteriorating financial position.

Barone, however, said Lay "still wanted his financial staff to be creative."

Prosecutors contend Lay hid bad news from debt-rating agencies to maintain that rating.

Lay is facing seven charges, including improperly avoiding writedowns and lying to outside auditors. Skilling's 31 counts include misusing reserves and signing misleading letters to auditors vouching for Enron's financial statements.