Goldman Sachs Group Inc has a duty to return the $10 billion it received in a U.S. government bailout, as it moves to benefit from an expected recovery in capital markets, its chief financial officer said.

The company was Wall Street's most profitable before converting to a commercial bank last September. It returned to profitability in the first quarter, on Monday posting a $1.66 billion profit after preferred stock dividends, more than double what analysts had forecast.

Goldman sold $5 billion of common stock at $123 a share, and plans to use the proceeds and other resources to repay the taxpayer money received under the government's Troubled Asset Relief Program.

Repaying the funds would free the New York-based company from government restrictions on its business, including caps on executive pay.

We never believed the investment of taxpayer funds was intended to be permanent, CFO David Viniar said on a conference call. We view it as our duty to return the funds, as long as we can do it without negatively impacting our financial profile, or ability to act as a central liquidity provider to the global capital markets.

Goldman shares fell $7.00, or 5.4 percent, to $123.15 in early trading.

David Trone, an analyst at Fox-Pitt Kelton, said the bank benefited in the first quarter from a windfall in fixed income, currencies and commodities results that is unlikely to repeat. He rates Goldman in line.

Goldman's results may raise expectations for rivals scheduled to report results this month, including JPMorgan Chase & Co on Thursday, Citigroup Inc on Friday, and Bank of America Corp and Morgan Stanley next week.

Viniar said the market environment remains dangerous for banks in light of extremely difficult macroeconomic conditions and tight credit market conditions, which puts a premium on liquidity.

He said Goldman benefited as traditional rivals retreated. But Goldman is doing less than rivals such as Morgan Stanley to diversify away from businesses sensitive to capital markets and corporate business activity.

We're not really a consumer lender, Viniar said.

Repaying TARP could also be risky if conditions worsen more than Goldman expects, and Viniar acknowledged that the company may be more upbeat about the economy than others.

Our economists are, I would say, more optimistic or less pessimistic than they've been about the outlook for the economies going into the second half of the year, so that gives us some cause for optimism, he said.

Viniar also said profit resulting from payments from ailing insurer American International Group Inc rounded to zero in the first quarter.

(Reporting by Dan Wilchins, Jonathan Stempel and Christian Plumb; editing by John Wallace)