WASHINGTON, June 21 (Reuters) - U.S. markets regulators on Friday unveiled an agreement on how much capital and margin firms must hold when trading swaps based on securities, finalizing a key piece of the 2010 Dodd-Frank law introduced following the 2007-09 financial crisis.

The Securities and Exchange Commission (SEC) and Commodity Futures Trading Commission (CFTC) agreed to fend off a regulatory overlap that would have drastically increased the capital burden for many firms already operating under CFTC rules, the regulators said.

The agreement underscores an unusual degree of harmonization between the two U.S. markets watchdogs, which in the past have been accused by the industry of jacking up their compliance bills by failing to coordinate. It is part of a broader push by U.S. President Trump appointees SEC Chairman Jay Clayton and CFTC Chairman Christopher Giancarlo to coordinate more closely on policy and enforcement matters.

“Moving these rules is a positive development in getting a big piece of Dodd Frank Title VII over the finish line, completing the mandate that Congress gave us,” Republican Commissioner Hester Peirce, who led the SEC rule-writing effort, said in an interview.

“We’re in the place we are because of the nice relationship with the CFTC,” she added.

Title VII of Dodd-Frank handed the CFTC oversight of the vast majority of the U.S. swaps market, including interest rate and foreign exchange swaps, but gave the SEC oversight of the small slice of the swaps market based on individual securities.

Dodd-Frank aims to make the swaps market safer by requiring dealers to hold sufficient capital and margin against swaps, and by pushing more swaps through clearing houses which sit in between trades to guarantee payment in case either party defaults. The CFTC implemented most of its post-crisis rules by 2014 but the SEC has lagged far behind.

The SEC first proposed capital and margin rules for swaps in 2012 but until Friday had failed to finalize them. In a move that caught the industry by surprise, the Republican-led SEC last year said it would try to finalize its Dodd-Frank regime.

Over the past few months, the agencies have worked together to address problems with the SEC proposal.

The SEC rule would have subjected swap trading firms already registered and regulated by the CFTC to an additional capital requirement.

CFTC data showed this additional burden could potentially put many firms out of business. Friday’s compromise would place the overwhelming majority of uncleared swaps trading by CFTC-registered firms under the CFTC’s capital rules, avoiding the additional SEC charge.

The new rules will not become effective for at least 18 months, the SEC said.

Brian Quintenz, the Republican CFTC commissioner who led the project at the agency, told Reuters the regulators are also discussing allowing trading firms more ways to reduce margin requirements by offsetting uncleared swap hedges, a process known as “portfolio margining.”

“We are going to be thinking about increased efficiencies in portfolio margining because having a good regime in this area can unleash a massive amount of capital in the real economy in a way that is very respectful of risk,” said Quintenz. (Reporting by Michelle Price; Editing by Richard Chang)