WASHINGTON (CNNMoney.com) -- The United Auto Workers union Friday overwhelmingly ratified a labor deal with General Motors that included concessions, but is not enough to keep the company out of bankruptcy.

Seventy-four percent of UAW members voted for the contract, which will allow the company to cut costs and "eliminate the wage and benefit gap" with competitors, according to the UAW president and a statement from GM.

"I think it's a disgrace we had to do anything," said UAW president Ron Gettelfinger during a press conference. "We tried to inflict the least amount of pain possible on our retirees."

It was widely expected that rank-and-file members would ratify the revised labor deal, even as General Motors (GM, Fortune 500) seems destined for bankruptcy.

The deal greatly reduced the amount of money that GM is required to contribute to union-controlled trust funds to cover health care costs for hundreds of thousands of retired union members and their families.

In return, the trust fund will receive a 17.5% stake in the reorganized GM starting next year, and the right to buy an additional 2.5% stake in the company.

In addition, the fund will receive $6.5 billion in preferred stock that pays a 9% interest rate, and GM will owe it an additional $2.5 billion. GM will not have to contribute more than $20 billion in cash it owed the trust fund.

The union will have to reduce retiree health care coverage. But the union did not agree to any wage or benefit cuts for the 61,000 UAW members working at GM. However, the job protections for those members were reduced and GM has announced plans to cut hourly employment by about a third to 40,000 by next year as it shuts more than a dozen plants.

The union did win guarantees that GM would build its new small car at a factory that has previously been closed. And the company agreed to put four closed plants on "stand by" status to be restarted if demand for autos bounces back.

The union agreed not to fight plans to import some small cars from outside of North America, such as GM's growing manufacturing base in China.

UAW members at Chrysler had already voted overwhelmingly in favor of contract revisions. The union won assurances the company would not use the bankruptcy process to try to gain more painful concessions from hourly workers. A federal judge is weighing Chrysler's restructuring plan.