Goldman Sachs agreed Thursday to pay a record $550 million to settle civil claims it misled investors about a subprime mortgage product it sold in 2007, resolving a major public relations nightmare for the Wall Street financial giant.

The Goldman Sachs booth on the floor of the New York Stock Exchange

The settlement, first reported by CNBC, sent Goldman shares up sharply in after-hours trading. (Click here for an after-hours quote)