Northrop Grumman [NOC] on Thursday evening announced two legal settlements with the Department of Justice (DoJ), one that requires the company to make a $325 million payment and the other to receive $325 million, resulting in a wash.

However, the company expects to record a net gain in the second quarter related to the settlement requiring it to pay $325 million related to DoJ claims that the former TRW, Inc., which was later acquired by Northrop Grumman, sold a government agency faulty microelectronics parts. In 2006 Northrop Grumman took a $112.5 million pre-tax charge to cover anticipated costs related to the claim.

The net gain that will be reported in the second quarter is expected to be less than the total $112.5 million pre-tax charge given associated legal fees incurred since then.

Northrop Grumman maintains that it acted properly under its contract with regard to the microelectronics mater. However, the company said it the settlement is in the best interest of all parties as it releases the company from the government’s claims, avoids litigation, and preserves a valued customer relationship.

The $325 million settlement that went in favor of Northrop Grumman relates to a suit the company filed in 1996 against the United States government to recover uncompensated costs, investments and a reasonable profit related to the Tri-Service Standoff Attack Missile program, which was cancelled for convenience in 1995.