WASHINGTON — One of the government's highest profile American contractors in Afghanistan has agreed to pay tens of millions of dollars to settle allegations that it overbilled the U.S. government.

In return, the Justice Department will end its investigation into allegations that Louis Berger was intentionally overcharging American taxpayers, individuals close to the investigation told McClatchy on Thursday. The settlement, which could be as high as $65 million, would include civil and criminal penalties.

Holly Fisher, a company spokeswoman, declined to comment on the settlement. A spokeswoman with the U.S. Attorney's Office in New Jersey, which is overseeing the case, also declined to comment.

The settlement is part of a deferred prosecution agreement, which means that the government retains its right to reopen the investigation if the company engages in future wrongdoing.

Louis Berger's alleged overbilling, a practice that dates to at least the mid-1990s, swelled to tens of millions in lost tax dollars, McClatchy first reported earlier this year.

In 2006, a former Louis Berger employee handed the government evidence against the company, two months before the U.S. Agency for International Development tapped Louis Berger to jointly oversee $1.4 billion in reconstruction contracts in Afghanistan.

It's unclear whether the settlement would impact the company's current operations in Afghanistan.

U.S. government officials, who asked to remain anonymous because of the sensitivity of the matter, said that the company continues to be the subject of separate ongoing investigations with regard to its work in Afghanistan.

Louis Berger spokeswoman Fisher issued this statement: "The Louis Berger Group/Black & Veatch Joint Venture is not withdrawing from Afghanistan. We are committed to successfully completing our work on behalf of USAID for the Afghan people, while ensuring the safety of all people working on these important projects."

Court documents, however, revealed that the Justice Department has been negotiating a deal that would "aid in preserving the company's continuing eligibility to participate" in federal contracting in Afghanistan and elsewhere.

The whistleblower case, known as a qui tam lawsuit, is sealed in federal court because of the ongoing criminal investigation.

McClatchy previously was able to piece together more details about the case by reviewing government documents and speaking to officials who insisted on anonymity because the case is under seal.

That review found that Louis Berger is accused of manipulating overhead cost data and overhead rate proposals submitted to the U.S. government and several states including Massachusetts, Nevada and Virginia.

In some instances the company is accused of shifting overhead costs from private clients to federal and state contracts, where they were less likely to be noticed.

In August 2007, federal agents raided Louis Berger's home office in New Jersey. Two senior officials, including one who has since left, were targeted in the investigation.

Founded in 1953, Louis Berger Group does engineering and construction-related work domestically and in about 80 countries worldwide, according to the company's website. It has more than 5,000 employees and is headquartered in Morristown, N.J.