The Pentagon and Lockheed Martin [LMT] have reached an agreement “in principle” for the manufacturing of the fifth batch of F-35 Joint Strike Fighters in low-rate initial production, the Department of Defense said in a statement Friday.

The agreement for 32 F-35s would end more than a year of contentious negotiations between the Pentagon and its prime contractor for the fifth generation multi-role aircraft.

“It’s been a long journey, but I’m pleased we’ve achieved an agreement that is beneficial to the government and Lockheed Martin,” Vice Adm. Dave Venlet, the program executive officer for the F-35, said.

The financial terms of the LRIP 5 contract were not released. An industry source said it valued $3.8 billion. The Pentagon authorized the LRIP 5 production in 2011 ahead of reaching a deal for the cost. The main source of the tension in negotiating the contract was said to be over how redevelopment–or concurrency–costs should be covered.

The contract calls for the production of 22 of the Air Force’s F-35A conventional takeoff and landing variants, three F-35B short takeoff and vertical landing versions for the Marine Corps, and seven F-35C carrier variants for the Navy.

LRIP 5 will bring the total number of F-35s built in low-rate production to 95.

The F-35 program has been mired in controversy over massive cost overruns and delays. It is now estimated it will cost $395 billion to produce the planned 2,443 fighter jets with a total life time cost, which includes maintenance and operations, expected to exceed $1 trillion over the next five decades.