Ford workers narrowly approved a new four-year contract, wrapping up five months of negotiations between the United Auto Workers union and Detroit automakers.

The UAW said late Friday that Ford's contract passed with a 51.4-percent vote. The agreement covers 53,000 U.S. hourly workers at 22 plants.

"There is no higher authority than the membership. Through a fair and democratic process UAW-Ford members have delivered job security and strong economic gains for their families and communities," said UAW Vice President Jimmy Settles, the union's top Ford negotiator, in a statement.

Union leaders held a press conference earlier this week to push for the Ford agreement when they feared workers would reject it. Some workers said the union didn't push hard enough to win back things they lost in previous agreements, including annual wage increases. They also wanted a two-tier wage system eliminated immediately instead of over eight years, as the contract promises.

But union leaders warned that they might not get a better deal from Ford if workers rejected the agreement and sent them back to the bargaining table.

"If we thought there was another dollar on the table, we would have got it the first time," said Bernie Ricke, the president of Local 600, a large union in Ford's hometown of Dearborn.

The contract raises wages for all workers and gradually eliminates the two-tier system, which currently pays newer workers less than veteran ones. It promises bonuses of up to $10,250 per worker this year and annual profit-sharing checks and other bonuses each year after that.

The contract also guarantees $9 billion in investments at Ford's U.S. plants over four years.

Ford said it was pleased with the vote.

"This agreement provides a good foundation for Ford Motor Company, our employees and our communities as we work together to create an even stronger business in the years ahead," Ford's labor chief, John Fleming, said in a statement.

Ford was the last of the Detroit automakers to win approval for its contract.

Copyright 2016 NPR. To see more, visit