Federal Reserve Chairman Ben Bernanke and then-Treasury Department chief Henry Paulson pressured Bank of America ( BAC) to not discuss its plan to buy Merrill Lynch, according to testimony by BofA CEO Kenneth Lewis, a report says.

Lewis, testifying under oath before New York's attorney general in February, told prosecutors he believed Paulson and Bernanke were instructing him to keep quiet about deepening financial difficulties at Merrill, the Wall Street Journal reports, which cited a transcript it reviewed. As part of his testimony, Lewis said the government wanted him to keep quiet while the two sides negotiated government funding to help BofA absorb Merrill and its huge losses. The deal to buy Merrill later triggered a government bailout of Bank of America.

Under normal circumstances, banks must alert their shareholders of any materially significant financial hits, the Journal notes. But disclosing losses at Merrill -- which eventually totaled almost $16 billion for the fourth quarter -- could have given BofA's shareholders an opportunity to stop the deal and let Merrill collapse instead.

"Isn't that something that any shareholder at Bank of America ... would want to know?" Lewis was asked by a representative of New York's attorney general, Andrew Cuomo, according to the transcript, the Journal reports.

"It wasn't up to me," Lewis said. Lewis said he was told by Bernanke and Paulson that the deal needed to be completed, otherwise it would "impose a big risk to the financial system" of the U.S. as a whole.

Lewis's testimony for the first time spreads some of the blame to Paulson and Bernanke for the CEO's decision to keep problems at Merrill silent.

"Everybody -- Lewis, Paulson, Bernanke -- eventually agreed that any public discussion of the situation at Merrill would have adverse consequences for the system," according to an individual close to the bank, the Journal reports.

Lewis couldn't be reached by the Journal for comment. A BofA spokesman said, "We had no legal obligation to disclose ongoing negotiations with the government and disclosure of ongoing negotiations likely would have severely disrupted the global financial markets and damaged the bank," according to the newspaper.

In the transcript reviewed by the Journal, Lewis didn't say he was explicitly instructed to keep silent about the losses piling up at Merrill. But his testimony indicates that he believed the government wanted him to remain silent.

The testimony -- which the New York attorney general plans to release to federal regulators and oversight officials -- stemmed from an investigation that started when Cuomo began examining the circumstances surrounding $3.6 billion of bonus payments to Merrill employees just before the takeover was completed, the Journal reports.

More from Stocks

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Neel Kashkari: The Heart of Our Financial System Is More Radioactive Than Ever

Neel Kashkari: The Heart of Our Financial System Is More Radioactive Than Ever

Finding Stocks Right for You: Cramer's 'Mad Money' Recap (Friday 8/25/18)

Finding Stocks Right for You: Cramer's 'Mad Money' Recap (Friday 8/25/18)

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain