Goldman Sachs Group Inc reported a 33 percent rise in quarterly earnings on Tuesday as a strong gain in trading was offset by a one-time charge to repay government loans.

Wall Street's largest surviving investment bank reported net income for common shareholders of $2.7 billion, or $4.93 a share, compared with $2.05 billion, or $4.58 a share, in the closest year-earlier quarter.

Analysts polled by Reuters Estimates forecast, on average, $3.49 a share, while those surveyed by First Call predicted earnings per share of $3.54. It was not immediately clear if the estimates were comparable to the reported figure. The results came in above analysts' consensus forecast.

Goldman shares fell less than 1 percent in electronic premarket trading.

Goldman, the first major U.S. bank to report second-quarter earnings, saw its performance bolstered by improving markets and strong trading results, as well as an upswing in advisory fees.

Gains were tempered by a one-time $426 million charge related to the repayment of $10 billion in loans from the U.S. Treasury's Troubled Asset Relief Program, known as TARP.

(Reporting by Steve Eder and Elinor Comlay; editing by John Wallace)