The embattled airports authority overseeing the $6 billion Dulles Rail project unexpectedly reinstated union executive Dennis Martire to its board Wednesday, ending a legal battle that was costing the authority and Virginia hundreds of thousands of dollars.

The Metropolitan Washington Airports Authority, or MWAA, board announced that Virginia and Martire reached an agreement in their legal fight and invited Martire back to the board table, where Martire announced he would resign from the board at the end of October "to prevent further distraction."

Gov. Bob McDonnell ousted Martire from the board in June, citing his lavish trips abroad on the airports' dime and potential conflict of interest as a union executive. But Martire fought back in court, saying the governor was being unfairly political.

The legal tussle was costing both parties in escalating attorney's fees and would have stretched into next year, Martire said.

"This thing would have gone on a long time," Martire said. "This could have gone on until 2013. My term's up in 2014. Does it make sense to spend millions of dollars in taxpayer money in Virginia and ... use MWAA money that we use for concessions for our airports on a litigation?"

The authority paid an initial $75,000 for Martire's attorneys and will determine in the coming weeks how much more to pay after the fees are examined by an outside party, officials said. The authority will also have to pay legal fees for board members forced to respond to subpoenas issued by Martire's lawyers.

Virginia has paid "a couple hundred thousand" in attorney's fees already but still has outstanding bills, Transportation Secretary Sean Connaughton said.

"Unfortunately, the citizens and businesses are on the hook for the fact that the MWAA decided to back one of its members when it shouldn't have," Connaughton said.

Martire will be replaced by McLean businesswoman and one-time state Senate candidate Caren Merrick.

The airports authority on Wednesday also adopted a new ethics policy that tightens rules on nepotism, gifts and conflicts of interest for board members and employees, as part of the authority's effort to remake its public image in the wake of criticism from federal, state and local officials involved in the Dulles Rail project.

But some board members chafed at the strict new limits, and six voted to raise the gift limit from $25 to $75. The effort failed.