Goldman Sachs executives tried to fend off accusations they inflated the housing bubble, sold clients shi**y deals and made billions off the market's collapse, in a high stakes Senate hearing.

Facing tough questions from a panel of Senators, the current and former employees said Goldman was managing risk on individual positions rather than making a broad bet against the future of the housing market.

They spoke deliberately, but at times looked uncomfortable as they were asked to leaf through massive evidence binders, crammed with emails and other internal Goldman communications.

The executives insisted they took responsibility for their actions, but mostly blamed the housing crisis on broader industry issues, rather than their own conduct.

Former mortgage chief Dan Sparks came the closest to an apology, saying the bank made some poor decisions in hindsight. He added: I don't have any regrets about doing things that I think were improper, but we were participants in an industry that got loose.

Senator Carl Levin, chairman of the Senate Permanent Subcommittee on Investigations, told Sparks and the other panelists, You should have plenty of regrets.

Goldman bond trader Fabrice Tourre said he did not hide material information from clients, in his first public appearance since the Securities and Exchange Commission accused him and Goldman of civil fraud for withholding details of a deal from investors.

Goldman has become a lightning rod for criticism for traders' behavior before and during the financial crisis that peaked in 2008, the worst economic decline since the Great Depression.

Goldman Chief Executive Lloyd Blankfein was last to testify, sworn in over seven hours after the hearing started.

Our clients' trust is not only important to us, it's essential to us, Blankfein insisted. It is why we are a successful firm.

The hearing room was full of protesters, some wearing striped prison outfits, holding pink signs reading SHAME and GOLDMAN BANKSTERs.

The subcommittee has held a series of hearings into the origins of the crisis, buttressing work on a bill to overhaul financial regulation.

The hearings recalled the Pecora Commission hearings that started in 1932 and investigated the causes of the 1929 stock market crash. Those hearings found unethical practices ranging from investors linking up to manipulate stock prices to selling stocks to friends of J.P. Morgan at discounted prices. The head of the commission, Ferdinand Pecora, is often credited with popularizing the word bankster, which combines banker and gangster.

Goldman Sachs shares were up 0.7 percent at $153.04 by the close of trading on Tuesday, defying a drop of about 2 percent in the broader market triggered by downgrades in Greek and Portuguese debt.

UNFORTUNATE EMAIL

Senators routinely tried to pin the Goldman employees down on whether particular deals were evidence of ethical lapses.

In a tense exchange, Levin asked Sparks whether he felt obliged to tell clients when betting against their trades.

Levin pointed to a particular transaction that one of Sparks' bosses termed a shi**y deal in an email. The Senator used the phrase shi**y deal at least a half dozen times at the hearing.

Sparks did not respond directly, and said it was not his own description of the transaction.

Later in the day, when asked about the email, Chief Financial Officer David Viniar said, I think that's very unfortunate to have on email.

People in the gallery laughed, and Senator Levin said, On email? How about feeling that way?

Viniar said, I think it's very unfortunate for anyone to have said that, in any form.

Levin asked about whether it was unfortunate to believe it, and Viniar said, I think that's very unfortunate as well.

Levin said that Viniar should have started with that sentiment, and Viniar agreed. Later, Viniar spontaneously expressed regret for not having started with a condemnation of the sentiment.

Viniar testified that the bank was mainly trying to reduce risk in late 2006 and 2007, rather than make a large bet on the direction of the housing market. The investment bank did not have a large short position, he said.

Large is in the eye of the beholder. Billions seem large to a lot of folks who lost their homes, said Levin.

Early in the hearing, Senator John McCain said that he did not know if Goldman Sachs did anything illegal, but added there was no doubt that Goldman Sachs behaved unethically.

That issue may be important for clients, and raises problems for Goldman itself. The bank famously tells new bankers, sales staff, and traders that they should not do anything that would embarrass the firm if printed on the front page of a major business newspaper.

A 6 billion euro ($8 billion) Dutch transport pension fund said it had dropped Goldman as its fiduciary manager, but said the decision had no connection to the SEC charges.

The SEC's April 16 fraud suit centers on a subprime mortgage-linked product known as Abacus 2007-AC1. The agency says Goldman failed to disclose that hedge fund Paulson & Co had input into its construction and was betting it would fail.

Edward Rogers, CEO of Tokyo-based hedge fund advisor Rogers Investment Advisors said Goldman's difficulties could hurt its ability to retain talent.

Why would you continue to work for an entity like Goldman Sachs, where the U.S. government is just going to be hauling you in front of committee after committee after committee for the next five years trying to prove you are a bad guy.

He added: The government hates you. Your friends throw tomatoes at you. You are evil now. You are not the smart guy in the room -- you are the evil, twisted greedy crook guy.

(Reporting by Steve Eder and Dan Margolies; Additional reporting by Dan Wilchins in Washington, Jonathan Stempel and Christian Plumb in New York, and Kei Okamura in Tokyo, editing by Tim Dobbyn)