WASHINGTON, June 25 (Reuters) - U.S. Senator Blanche Lincoln credited common sense for helping forge a compromise on her proposal to force banks to spin off their swap trading operations, allowing them to retain the bulk of their books but bar them trading commodities, equity and credit default swaps.

The plan was not as sweeping as Lincoln's original proposal to require banks to spin off their swaps desks, instead narrowing the focus to those derivatives perceived as riskier than the interest rate and foreign exchange swaps that make up nearly 90 percent of the global swaps market.

But Lincoln upended predictions that her idea would be scrapped due to broad opposition by Wall Street and allies in Congress.

Quite frankly, common sense prevailed, said Lincoln, chairman of the Senate Agriculture Committee, shortly after House and Senate negotiators agreed on a financial reform bill.

Our objectives were to get the risky stuff out of banks. We figured out how to do that, said the Arkansas Democrat.

Lincoln's proposal was one of the major disputes for negotiators on the financial reform bill.

In the final hours of overnight talks, Lincoln and Obama administration officials agreed on a compromise. Business-friendly Democrats tried to derail the spinoff but failed during discussions held on the sidelines.

Under the agreement, banks could continue to handle foreign exchange, interest rate, gold and silver swaps and to hedge their own risks. Activity in commodities, agricultural, energy, equities swaps and credit default swaps that are not traded through a clearing house would have to move to an affiliate within two years.

The beneficiaries of the derivatives compromises worked out in the final stages include banks, clearinghouses, and financing arms of manufacturers, including companies such as Ford, Deere and Caterpillar, said Martin Fridson, global credit strategist at BNP Paribas Asset Management.

On the face of it, the modifications appear reasonable and aimed at avoiding adverse consequences that are unnecessary in terms of achieving the legislation's main objectives, Fridson said.

This is a good middle ground, said House Agriculture Committee chairman Collin Peterson.

While the Bank for International Settlements puts the total value of all over-the-counter derivatives is $615 trillion, that figure includes options, forwards and other derivatives that are not swaps. When those are removed, the estimated value of the swaps market in December 2009 was $425 trillion.

According to the most recent data effective December 2009, some 82 percent of all defined over-the-counter or OTC swaps were on interest rates at just over $349 trillion, with another 5.0 percent in foreign exchange and less than 1.0 percent on equities and commodities.

Lincoln is expected to face a strong challenge for re-election this fall from John Boozman, a fifth-term Republican member of the House. She won nomination for a third term in early June.

Gary Gensler, head of the Commodity Futures Trading Commission, said the bill is truly historic. It will reduce risk in financial markets, he said.

We haven't discussed that, Gensler said when asked how the bill might affect CFTC consideration of position limits on energy contracts. The bill allows CFTC to set position limits on physical commodities.

The reform must still win final approval from both chambers of Congress before Obama can sign it into law, giving Wall Street one final chance to deploy its army of lobbyists on Capitol Hill. Quick approval is expected and the reform could go to Obama for his signature by July 4.

Final implementation of the rules also will be a challenge in the coming year, analysts said.

Regulators have a year to work out implementation, during which time there will no doubt be aggressive lobbying on the design of the rules, BNP Paribas' Fridson said. So financial services firms may roll back some of the substance of the legislation through concerted lobbying while Congress and the public's attention move on to other issues. (Reporting by Charles Abbott and Walden Siew in New York; Editing by Alden Bentley)