WASHINGTON (Reuters) - The U.S. derivatives regulator is finishing a new rule to curb speculators with large positions in commodity markets that is in parts tougher than the previous version, two sources with direct knowledge of the plan said.

Commodity Futures Trading Commission Chairman Gary Gensler is rushing to get a revamped rule out before his term runs out in December, said the sources, even while agency lawyers are preparing to defend the original position limits rule that was knocked back by a U.S. court last year.

"Gary wants to get this done before he leaves," said one of the sources, asking not to be named because he was not authorized to talk to the press.

The position limits rules are among the most contentious of the 2010 Dodd-Frank legislation reforms that aim to prevent a repeat of the financial crisis but they threaten to compound the troubles facing Wall Street's biggest banks whose role in physical commodity markets is under fire.

The new rule will contain a better legal justification to conform with the U.S. District Court ruling that the CFTC had failed to prove that the limits were needed, the first source said. It will better weigh the costs and benefits of the impact of the rule to support the economic rationale behind it.

It would drop an important irritant for the bank groups who fought the rule before the court, by allowing broad exemptions for positions held by firms in which they own minority stakes of between 10 and 50 percent, as long as the banks can prove they don't control the firms.

The original rule set the threshold for aggregating positions at 10 percent, a level the industry had found "draconian", according to the first source. Above 50 percent, exemptions were also still possible, though explicit CFTC approval was needed, the sources said.

This may placate banks like Goldman Sachs (GS.N) and Barclays (BARC.L) and others, who had said before the court that the fact they needed to aggregate holdings of companies they owned meant high compliance costs.

A Commission vote on the rule which would then still need to be finalized had been expected at the end of this month, but the date is in doubt because of the U.S. federal government shutdown.

Both sources stressed that the rule still was not final, and details could change, but they also sounded confident that it would get adopted soon once the agency reopens. The CFTC is not commenting on its activities during the shutdown as nearly all its staff are furloughed.

MORE POWER, MORE TROUBLE

The CFTC was given powers to impose position limits under the Dodd-Frank law, which seeks to address market disruption by speculators and protect farmers and other so-called end-users who use derivatives to protect against price swings.

The agency earlier suffered a setback when a judge for the U.S. District Court in the District of Columbia sided with bank groups who argued that it had not sufficiently argued what the benefits of its rules were, and struck them down.

Its two-pronged legal strategy of appealing the decision while at the same time rewriting the rule has raised eyebrows, even with some people inside the agency.

Another crucial change in the new text means a less favourable deal for large commodity traders such as Cargill CARG.UL and Bunge (BG.N), the first source said, who will lose a core exemption known as "anticipatory hedging", using derivatives to hedge against a future cash deal.

While the old rule specifically exempted this trading strategy, the activity would count as speculation under the new proposal, because these large traders are generally not end-users of the commodities themselves.

"The (traders) are going to have some problems with this proposal. I think the banks are going to be happier," the first source said.

CONDITIONAL LIMITS MAKE COME-BACK

The CFTC is also planning to reintroduce so-called conditional limits, which means parties can hold as much as 125 percent of the deliverable supply of a particular commodity as long as they hold no physically settled futures.

CME Group (CME.O) had fiercely lobbied against this, because the futures exchange felt it would deter trading in the physical delivery futures contract, where they generally have no competitors, the first source said.

The position limits will be imposed for 28 physical comodity futures contracts, ranging from grains to milk and feeder cattle and cocoa, as well as four energy contracts traded on NYMEX and five COMEX and NYMEX metals contracts.