WASHINGTON — Robert Rubin, the former financial superstar, was scolded Thursday over the mortgage-securities disaster at Citigroup Inc. when he was a top executive there. His claim that he didn’t know of the risks piling up drew a sharp retort.

“You can’t have it both ways: You either were pulling the levers or asleep at the switch,” the head of the panel investigating the roots of the financial crisis told Rubin at a hearing.

Rubin expressed regret. Yet he insisted he didn’t know until late in the game, when the subprime mortgage crisis erupted in September 2007, about the $43 billion in high-risk mortgage securities on Citigroup’s books.

The Citi trading-desk executives who built up that mountain of risk “acted in good faith and did what they felt was appropriate,” Rubin said. He said they thought, as many others on Wall Street did, that the triple-A rated securities were safe from default.

“There isn’t a way that you’re going to know what’s in those (bank) position books,” he said. “You really are depending on the people who are there to tell you.”

But Phil Angelides, chairman of the Financial Crisis Inquiry Commission, told Rubin that as head of the executive committee of Citigroup’s board, “You were not a garden-variety board member. … I’m not so sure apologies are as important as assessment of responsibility.”

The public scolding of Rubin marked another chapter in his fall from grace. Until the financial crisis struck with force in 2008, he enjoyed renown as one of the most influential figures in global finance. After leading Wall Street powerhouse Goldman Sachs & Co., Rubin served as treasury secretary in the Clinton administration.

Critics have said Rubin, with his vast experience, should have picked up on the crisis warning signs and taken a more active role in preventing Citigroup’s debacle.

Angelides said of Rubin and former Citigroup CEO Charles Prince, who resigned at the height of the turmoil in November 2007: “The two of you in charge of this organization did not seem to have a grip on what was happening.”

New York-based Citigroup was a major subprime mortgage lender and one of the hardest-hit banks during the credit crisis and the recession. It received $45 billion in federal bailout money, one of the biggest rescues in the government’s program.

As borrowers defaulted, Citigroup’s losses reached nearly $30 billion on some portions of collateralized debt obligations, the complex financial instruments that combine various slices of debt.

Prince also said he wasn’t aware until September 2007 that the bank had held onto the $43 billion in investments composed of repackaged mortgage bonds. The next month, Citigroup estimated it would lose $8 billion to $11 billion in the fourth quarter that year from those securities.

Prince said he was “deeply sorry” for the failure of the bank’s management, starting with him, to foresee the crisis that wreaked devastation on the U.S. economy and ordinary Americans.

“It is hard for me to fault the (Citigroup) traders who made the decisions,” he said.

The federal regulators, too, failed to see the signs of trouble at Citigroup, Prince and Rubin told the panel. Examiners from the Federal Reserve and the office of the U.S. Comptroller of the Currency were “embedded” in the bank, poring through its books every day, Prince said.

The same failure of judgment made by bank management “was fundamentally also made by the regulators,” he said.

In later testimony, John Dugan, head of the Office of the Comptroller of the Currency, which regulates national banks, said the examiners’ impression of Citi executives was “they had a firm grasp of risk, but their appetite (for assuming risk) got bigger” and caused trouble once the risky securities infected Citi’s balance sheet.