WASHINGTON (Reuters) - The U.S. Department of Defense resumed accepting F-35 jet deliveries from Lockheed Martin Corp LMT.N last week after reaching an agreement on covering the costs to fix a production error, the Pentagon told Reuters on Monday.

FILE PHOTO - Lockheed Martin's logo is seen during Japan Aerospace 2016 air show in Tokyo, Japan on October 12, 2016. REUTERS/Kim Kyung-Hoon/File Photo

Terms of the agreement were not disclosed. The cost of the fix was $119 million, people familiar with the situation had previously told Reuters.

The Pentagon had stopped accepting the jets on March 29, the Pentagon’s F-35 Joint Program office told Reuters in a statement. The dispute was over responsibility for paying to fix corrosion related to an error discovered in the second half of 2017.

The military, U.S. allies that own F-35s and Lockheed Martin are making the necessary repairs to all aircraft, the Pentagon’s office in charge of the fighter program said in the statement.

When the Pentagon stopped taking delivery of F-35s, foreign customers also were affected. At least two foreign governments, Australia and Norway, had their jets caught up in the acceptance pause.

The majority of aircraft will be repaired within two years, the statement said.

Lockheed shares added to gains after the news and closed up 2 percent at $317.71.

Last year, the Pentagon stopped accepting F-35s for 30 daysafter discovering corrosion where panels were fastened to theairframe, an issue that affected more than 200 of the stealthyjets.

During routine maintenance at Hill Air Force Base in Utah last year, the Air Force detected “corrosion exceeding technical limits” where the carbon fiber exterior panel is fastened to the aluminum airframe.

Once a fix had been devised, the deliveries resumed andLockheed hit its target aircraft delivery numbers for 2017.

A lack of protective coating at the fastening point thatwould have prevented corrosion was identified as the primaryproblem, the Pentagon said at the time.

The fastening issue on the F-35 fleet did not affect flights, nor was it a safety concern, the Pentagon said last year.

On Monday, Lockheed said an agreement had been reached with the Pentagon, adding that it expected to hit its F-35 delivery target of 91 aircraft for 2018.

The pause was the latest production issue that has arisen in the Pentagon’s most expensive weapons program. In 2016, a fix for insulation problems in the fuel tanks and lines of the jets caused a slowdown in deliveries.