Goldman Sachs Group Inc agreed to pay $550 million to regulators to settle civil fraud charges over how it marketed a subprime mortgage product, ending a weeks long probe that rattled clients and weighed on its share price.

The investment bank paid the largest settlement against a financial services firm with the Securities and Exchange Commission. But many investors viewed the $550 million as just a slap on the wrist for a bank that earned more than $13 billion last year.

Goldman's shares rose 4.2 percent after the market closed, after rising 4.4 percent late in the day on reports that the bank was settling.

The SEC accused Goldman of creating and marketing a debt product linked to subprime mortgages without telling investors that a prominent hedge fund helped choose the underlying securities and was betting against them.

Goldman acknowledged as part of the settlement that its marketing materials were incomplete. Of the $550 million settlement, $250 million will be returned to harmed investors, and $300 million will go to the U.S. Treasury.

The settlement is subject to approval by a federal judge.