The International Association of Machinists has won the right to match any bid to take over United Airlines, including those from other unions such as the Air Line Pilots Association.

The agreement, part of a tentative new three-year contract, amounts to poison pill protection for United, which was put into play earlier this year when the pilots union offered to buy the airline. The management of Allegis Corp., which owns United, was forced to restructure and sell its nonairline assets to make it a less attractive takeover target.

The pilots' union has, however, persisted in its bid for United.

The new contract agreement was being voted on yesterday by the more than 20,000 IAM members at United. Ratification was expected.

In addition to the right to bid on the airline, the agreement provides an 11 percent increase in base wages and small increases in health and welfare benefits.

Furthermore, if anyone acquires as much as 20 percent of the company's stock, the machinists could strike, reopen negotiations or extend the contract for another three years, locking in an additional 11 percent pay increase.

IAM President William W. Winpisinger said yesterday the new contract was not specifically aimed at the pilots union. "It's protection against anybody," he said.

Winpisinger noted that the union has opposed the pilots bid. He said that until the pilot's takeover bid United had been a very stable employer that had never asked the IAM for contract "takeaways."

Ironically, the pilots' bid provided the IAM with considerable leverage in its negotiations with United. "The only alternative was to risk a strike or be confronted by the whole problem of the mechanics {IAM} teaming up with the pilots," said Paul Karos, an airline industry analysts with L.F. Rothchild, Unterberg, Towbin Inc. "Now I know why management gave up a little something."

United spokesman Matt Gonring said the company had no comment on the contract proposal except that "it's a fair proposal that provides benefits to employes and shareholders alike while allowing the company to compete."

Although analysts said the IAM contract appeared to nullify the pilots' bid, the pilots union said yesterday it was not sure of the impact. "Our financial people are looking over the language now," said Hank Krakowski, a spokesman for the union at United. He noted that the contract allows the IAM to join with the other unions to make a bid if they choose to do so.

United employes are represented by the IAM, ALPA and the Association of Flight Attendants.

The flight attendants have reached a tentative agreement on a 42-month contract with United calling for a 4 percent wage increase. The contract must still be ratified. A spokeswoman for the flight attendants said the antitakeover agreement reached by the IAM was not part of a coordinated effort by the two unions.

The poison pill provision was sought by the union, according to a company source. An IAM official said yesterday that the union was not "looking forward" to making a takeover bid, but wanted to be able to protect itself. He denied that the provision was aimed directly at the pilots, but said the union would be willing to take on the pilots if necessary.

In April, ALPA said it was offering $4.5 billion to buy the airline. It has continued to pursue United, despite the restructuring of Allegis Corp., which sold its nonairline businesses, including Hertz, Westin Hotels and Hilton International Co.

In August, William R. Howard resigned as chairman of Piedmont Aviation Inc. to become head of Airline Acquisition Corp., the vehicle set up by the pilots to pursue United. The pilots' offer depends both on lining up financing and on concessions from United employes.