Updated

Defending his company under blistering criticism, the CEO of Goldman Sachs testily told skeptical U.S. senators Tuesday that customers who bought securities from the Wall Street giant in the run-up to a national financial crisis came looking for risk "and that's what they got."

Lloyd Blankfein and other Goldman executives were lambasted by lawmakers for "unbridled greed" in an often-electric daylong showdown between Wall Street and Congress -- with expletives frequently undeleted. Unrepentant, five present and two past Goldman officials unflinchingly stood by their conduct before a Senate investigatory panel and denied helping to cause the financial near-meltdown that turned into the worst recession since the Great Depression.

"Unfortunately, the housing market went south very quickly," Blankfein told skeptical senators. "So people lost money in it."

"We didn't have a massive short against the housing market, and we certainly did not bet against our clients," Blankfein said. "Rather, we believe that we managed our risk as our shareholders and our regulators would expect."

Sen. Carl Levin also accused a Goldman Sachs executive Tuesday of knowingly "trying to sell a sh---y deal" to investors, as the Senate's hearing into the Wall Street giant's investment practices kicked off with all the trappings of a show trial.

The hearing was held as Senate Democrats try to push through a sweeping financial regulation package on Capitol Hill, and as the Securities and Exchange Commission pursues a fraud case against the investment bank. Lawmakers used the forum to grandstand and shame the firm's executives for their role in the midst of the financial crisis.

"You're trying to sell a sh---y deal, and it's your top priority," Levin, chairman of the investigative subcommittee holding the hearing, told Daniel Sparks, a former partner and head of Goldman's mortgages department.

The Michigan Democrat was citing a 2007 internal e-mail from another Goldman executive, Thomas Montag, that called a mortgage-linked investment transaction "one sh---y deal." Levin repeatedly cited that e-mail at the end of a lengthy, rapid-fire exchange with Sparks.

Levin said Sparks sold hundreds of millions of dollars in securities in those transactions, even after the June 2007 e-mail. "You knew it was a sh---y deal, and that's what your e-mails showed," the senator said.

Sparks defended himself, saying the internal message reflected more "that my performance on that deal wasn't good and the fact that we had lost money related to that wasn't good."

At the top of the hearing, senators accused Goldman Sachs of reaping huge profits from betting against the housing market in an "unethical," if not illegal, investment scheme.

"It's gambling, pure and simple raw gambling," Sen. Claire McCaskill, D-Mo., said, in a tough dressing-down of the executives on the panel. "You had less oversight than a pit boss in Las Vegas. ... All of you were lemming-like, you were chasing each other."

The heavyweight financial firm is under fire for allegedly having a profitable plan to short the mortgage market, or bet against it.

Maine Sen. Susan Collins, the ranking Republican on the Senate Homeland Security Committee, told executives in attendance that it was "unsettling" to read recently released e-mails from the company "celebrating the collapse of the housing market."

"While the market was on the verge of collapse, Goldman decided to go short and earned billions from that strategy," she said. "While some conflicts of interest may be legal, they certainly seemed ethically questionable."

Sen. John McCain, R-Ariz., said it's unclear whether the firm's behavior was illegal, but "There's no doubt their behavior was unethical."

Goldman has been fighting back. Aside from the criticism from senators, the company is facing a case from the Securities and Exchange Commission, which has alleged that Goldman concocted mortgage investments without telling buyers that the investments had been put together with help from a hedge fund that was betting on them to fail.

The trader at the heart of the SEC case on Tuesday defended himself against what he called "false charges." Fabrice Tourre said he "did not mislead" investors about his transaction and that it was "not designed to fail."

"I deny categorically the SEC's allegations, and I will defend myself in court against this false claim," he said.

The Associated Press contributed to this report.