Defense contractor Oshkosh Corp and the United Auto Workers union reached tentative agreement on a new five-year contract late Thursday night after resolving issues related to hiring temporary workers, a local UAW official said.

The pact will be voted on Saturday by about 3,000 workers in Oshkosh, Wisconsin. Last week, UAW workers overwhelmingly turned down Oshkosh's first contract offer, largely because of language related to the hiring of temporary workers.

UAW Local 578 President Nick Nitschke said in a phone interview that the union worked with Oshkosh officials to revamp the contract. Oshkosh spokesman John Daggett confirmed the tentative deal but declined to give further details.

Initially, the company wanted the right to unilaterally hire up to 8 percent of the staff of its UAW-represented plants as temporary workers.

But the union insisted the company get UAW approval on all temporary-worker hiring programs over the next five years, and Oshkosh has agreed to that, according to Nitschke.

The UAW is Oshkosh's biggest union, representing about a quarter of its employees worldwide. Oshkosh has offered an 8 percent pay increase through 2016 due to rising health care premiums, and higher co-pays for workers.

If the contract is ratified, the deal represents a compromise for both sides.

For UAW workers, there may be less money than was in the company's first contract offer. Oshkosh initially offered workers a $2,000 signing bonus if the deal was ratified by September 30. Nitschke said on Friday that the $2,000 bonus was no longer part of the deal, but he does not expect this to deter ratification.

It was never about the money, Tim Jacobson, a 32-year-old Oshkosh worker, said on Thursday during a union rally outside the hotel where officials were negotiating. This is about having job security for a next generation of workers.

For Oshkosh, the deal could limit the flexibility it has in relation to fixed costs in coming years as it faces uncertainty in its core defense business. Company executives have pointed to fewer government contracts and increased competition as reason for caution over the near-term.

In a separate interview Thursday, prior to the agreement on a deal, Nitschke said the UAW preferred that all new hires at UAW-represented Oshkosh plants be treated as full-fledged employees with contracts that include benefits and job security provisions.

Anywhere where you have a collective bargaining agreement, that's one of the things they're going to work for, to make sure that there's no other way to bring capacity in than through full-time union jobs, said Tig Gilliam, who heads North American operations for Adecco SA, the world's largest staffing company. Companies have to find other ways to manage flexibility.

Still, many large manufacturers have hammered out temporary-worker agreements with unions, including the UAW, that allow the companies considerable flexibility to staff up operations when shorter-term work is available. Caterpillar Inc, Ford Motor Co, and Harley Davidson Inc are among companies currently utilizing such a strategy.

The new Oshkosh deal promises to be closely watched by investors and analysts who have been concerned about the company's exposure to a defense sector that is under pressure. Oshkosh shares are off more than 50 percent from their 52-week high and were down 2 percent to $16.83 in Friday morning trading.

(Reporting by John D. Stoll in Oshkosh, Wisconsin; additional reporting by Nick Zieminski in New York; editing by Gerald E. McCormick and John Wallace)