Enron's former chief financial officer has testified to setting up partnerships designed to help the firm hide losses of millions of dollars.
Mr Fastow faces 10 years in jail for his part in the Enron scandal
Andrew Fastow took the witness stand at the trial of ex-Enron bosses Jeffrey Skilling and Ken Lay.
The two deny multiple charges of conspiracy, fraud and insider trading linked to the collapse of the US energy firm in December 2001.
Mr Fastow has already pleaded guilty to conspiracy and faces 10 years in jail.
His intimate knowledge of Enron's finances make him a key witness for the prosecution.
Mr Fastow said the "LJM" partnerships - the initials are those of his wife and children - were used to buy poorly performing investments from Enron and disguise losses from investors and analysts.
"We were doing this to inflate our earnings, and I don't think we wanted to show people what we were doing," he told the court.
He said Mr Lay and Mr Skilling signed off the deals and encouraged his activities.
He described how Mr Skilling urged him to use one of the partnerships to buy a minority stake in a Brazilian power plant owned by Enron because Enron's South American unit was struggling to meet its earnings target.
Mr Fastow was rewarded with lucrative fees for handling the partnerships, but he said money was not his only motivation.
"I would look like a hero," he said, for helping Enron executives "make income targets Wall Street was setting".
Both Mr Lay and Mr Skilling have always protested their innocence
Mr Lay and Mr Skilling have denied they took part in any crimes and blame Mr Fastow for Enron's collapse.
Their defence team maintains that many of the former Enron employees that have come forward as prosecution witnesses have confessed to crimes they did not commit, in the hope of getting reduced prison sentences.
The collapse of Enron, once the seventh-largest company in the US, was the largest bankruptcy of its time.
The firm left behind $31.8bn (£18bn) of debts, its shares become worthless, and 21,000 workers around the world lost their jobs.
Its demise helped lead to the adoption of stricter disclosure laws in the US.