With the historic overhaul of financial rules nearly complete, lawmakers have waited until the final, frantic hours to sort out the most controversial provisions in the bill.

Democrats in charge of the process appear likely to retain tough restrictions on banks' trading and investment activities that could crimp profits for the foreseeable future.

But with a self-imposed deadline of Thursday evening, last-minute dealmaking could lead to exemptions for mutual funds, manufacturers and other business interests.

As lawmakers opened what they hope will be a final, marathon negotiating session on Thursday morning, two of the most controversial issues remained unresolved -- a proposed ban on banks' proprietary trading activities known as the Volcker rule, and a crackdown on derivatives trading.

The broadest rewrite of Wall Street rules since the 1930s aims to avoid a repeat of the 2007-2009 financial crisis that plunged the global economy into a deep recession and led to taxpayer bailouts of troubled banks.

Success would allow President Barack Obama to hold up the legislation as a model for other economic powers weighing reforms at this weekend's Group of 20 meeting in Canada.

It also would give Democrats an important legislative victory, alongside healthcare reform earlier this year, as congressional elections loom in November.

Negotiators aim to resolve differences between versions of bills passed by the House of Representatives and the Senate in a final session that could last deep into the night.

Failure is not an option, said Democratic Senator Christopher Dodd, the Senate's lead negotiator on the issue.

The notion somehow that we would leave here and by a vote or two fail to do this and leave the country as vulnerable today as it was ... when we came to the brink of disaster, he said after the panel finished work on Wednesday, would be the height of irresponsibility.

Wall Street lobbyists have been unable to kill both proposals as Democrats ride a wave of public disgust at the industry over the damage to the economy and employment from the financial crisis of 2008.

Still, the members of the committee are likely to soften their toughest proposals to retain the support of centrist lawmakers whose votes will be needed for the merged bill to clear both chambers of Congress before it is sent to Obama.

NOTES IN EVERY POCKET

Dodd appears increasingly frustrated, trying to maintain broad support among senators as he negotiates changes to the bill with members of the House. While Democrats control both chambers, Dodd must win over at least one Republican while keeping liberal Democrats on board to assure passage.

Dodd said his colleagues are bombarding him with requests for specific provisions to be included in the final bill.

My pockets are filled with notes, Dodd said.

Moderate Republican Senator Scott Brown was at the center of efforts to weaken the Volcker rule -- the ban on banks' proprietary trading first proposed by White House economic adviser Paul Volcker, according to aides.

Senate negotiators have also fought to blunt the impact of new consumer-protection rules on small businesses, a key concern of moderate Republican Senator Olympia Snowe.

Another centrist, Democratic Senator Blanche Lincoln, pushed to force banks to spin off their swaps-dealing operations and capitalize them separately as she fought a primary election challenge from the left in her home state of Arkansas.

Many analysts had expected Lincoln to quietly drop the provision afterward but she has fought to keep it in and a softened version could become part of the law.

The panel will have to work through more than 100 proposed tweaks to the derivatives crackdown, which aims to tame a $615 trillion market that exacerbated the financial crisis and led to a $182 billion taxpayer bailout of insurance giant AIG.

Wall Street has deployed an army of lobbyists to fight the measure. With the endgame at hand in Congress, their efforts may soon shift to the regulatory agencies that will put the new rules in place.

(Additional reporting by Roberta Rampton, Kim Dixon, Kevin Drawbaugh, Rachelle Younglai and Charles Abbott; Editing by Simon Denyer and John O'Callaghan)