The Navy, ignoring distress signals from West Coast shipbuilders, announced yesterday that it has selected a Maine shipyard to become the initial producer of a new generation of guided-missile destroyers.

The choice of Bath Iron Works Corp. of Bath, Maine, ends a bidding war for the right to produce the lead ship of the Arleigh Burke class. It has been described as the largest surface ship contract left to be awarded by the Navy in this century, with costs expected to reach $10 billion.

The award is a timely illustration of the flip side of the controversial defense budget Congress is considering: weapons equal jobs.

Bath Iron Works, which was awarded $322 million to design and build the pilot ship, was selected over two higher bidders -- Ingalls Shipbuilding Division of Litton Systems Inc. in Pascagoula, Miss., and the Los Angeles Division of Todd Pacific Shipyards Corp.

Todd Pacific, which offered to do the work for $413.5 million, has warned that losing the contract could force it to shut its Los Angeles yard, the last major surface combatant shipbuilder on the West Coast. The company had lobbied strenuously and ran a national advertising campaign in pursuit of the lead ship contract.

Although the Navy plans to choose two other shipyards in the next two years to help build 29 destroyers, the lead producer usually is best positioned to garner the biggest portion of work. "It's a blow to private shipbuilding on the West Coast," said Rep. Daniel E. Lungren (R-Calif.), whose district encompasses the 2,900-employe shipyard. "They were saying the shipyard might go under if they didn't get the lead contract. They're talking about laying off people immediately."

A Navy spokesman said Bath Iron Works was selected because it was lowest bidder, and that Todd Pacific would be considered for the next round of bidding.

The Bath Iron Works agreement reflects the Navy's emphasis on controlling procurement costs.

It is the first fixed-cost contract awarded for lead ship construction, theoretically obligating the shipyard to stay below a price ceiling or lose part of its profits.

It also includes several unique incentives to encourage efficiency, including a clause allowing Bath Iron Works to reap half of any savings in producing the ship below costs. In another provision, the Navy agreed to give special bonuses to the shipbuilder for good work based on evaluations every six months.

Bath Iron Works agreed to assume up to $10 million liability for faulty workmanship on the ship, which is to be completed in October 1989.

To heighten competitiveness, the Navy plans to choose a second contractor in fiscal 1987 and a third in fiscal 1988. They will share production of the 29 destroyers to be built through the 1990s.

The Arleigh Burke class, a 466-foot ship formally designated DDG51, has been a source of controversy since it was proposed in 1983 by Navy Secretary John F. Lehman Jr., who has called it "the cornerstone of our destroyer forces for the coming decade."

Other Pentagon officials argued that the ship would be too expensive and potentially vulnerable in wartime, but Lehman prevailed.

The bidding process attracted public attention when Todd Pacific began urging the Navy to comply with a 1956 law requiring it to maintain private shipyards on the West Coast "adequate to meet the requirements of national defense."

But the California contractor was operating at a disadvantage from the start because of the significantly higher wage rates on the West Coast.