Boeing Co and General Dynamics Corp on Thursday each agreed to give the U.S. Navy $200 million in aircraft and services to settle an epic, 23-year legal dispute over cancellation of the $4.8 billion A-12 stealth aircraft in 1991. The agreement resolves the last of series of legal cases spawned in 1991 when then-Defense Secretary Dick Cheney canceled the A-12 Avenger II program after it ran into major schedule delays and cost overruns in the 1980s. At the time, the government demanded the companies pay back $1.3 billion they had already received for work on the next-generation, carrier-based tactical airplane. The Justice Department announced the agreement, which was authorized as part of the 2014 defense authorization bill, noting that the U.S. government would not pay any money in connection with the companies’ claims. The companies had sued the U.S. government in federal claims court to retain the money they had received, plus more than $1 billion in additional amounts, plus interest. They argued that the government had wrongfully terminated the contract. “It’s long been time to move on,” said Virginia-based defense consultant Loren Thompson, noting that the dispute centred on the way that Cheney chose to terminate the program, not the actual cancellation. “What this illustrates is how one careless decision by a senior government official can cost taxpayers a huge amount of money.” The case dragged on for over two decades, spanning five trials and three appeals, including one to the U.S. Supreme Court, which in 2011 threw out a ruling that could have forced the companies to repay $3 billion in contract fees and interest. It said the decision would make neither side happy. Navy Secretary Ray Mabus welcomed the agreement, under which the Navy will receive three EA-18G electronic attack aircraft from Boeing, and a $200 million credit from General Dynamics toward its work on a new DDG-1000 destroyer. “We are closing a 23-year-long chapter in the annals of naval aviation and further strengthening, through the contractors’ in-kind payment, the Navy’s capabilities and capacities,” Mabus said. “The litigation was protracted and difficult, but it saved the Navy billions of dollars.” The case was one of the longest-running disputes over military procurement in history. General Dynamics mentioned the pending settlement in its fourth-quarter earnings report on Wednesday. It said its quarterly net profit included a $129 million loss in discontinued operations related to the settlement. No comment was immediately available from General Dynamics. Boeing spokesman John Dern said his company, which acquired McDonnell Douglas, was please the litigation was finally over. “Boeing is pleased that this decades-old litigation has come to an end,” Dern said. “We appreciate the efforts of the Navy and the Justice Department to resolve this matter, once and for all, on terms acceptable to all parties.” In its release, the Justice Department said the agreement resolved the final unresolved issue in the case, which had been pending in the Court of Federal Claims.