You can’t blame Bath Iron Works for a decision that under former Pentagon rules would increase its chances of getting contracts to build more of a new class of warships.

But when the U.S. Navy changed those rules in a way that seems to block BIW from bidding on any of those vessels, that’s a move that puts national security in second place.

BIW has apparently lost out on the opportunity to build any “littoral” combat ships, designed for shallow coastal waters. C’est la vie, some would say. But that ignores BIW’s reputation as the country’s best shipyard for vessels of a similar size and purpose.

As it has with former destroyer and cruiser design-and-construction contacts, the Navy had set up a competition between two teams of firms. One team was BIW and a shipbuilding firm in Alabama, Austral USA. The other was Lockheed Martin and a Wisconsin firm, Marinette Marine.

The Navy, which had planned to build ships from both designs, then changed its mind and said it only wanted 10 of one design. That led BIW to make the business decision to sever ties with Austral USA, so it could bid on building some ships no matter which team’s design won the competition.

But on Nov. 4, the Navy said it was asking Congress to approve 20 ships, 10 each from Austral and Marinette.

While BIW’s corporate parent, General Dynamics, will still get electronics work from both firms, BIW is apparently shut out from bidding on the actual construction of any vessels.

BIW says it will have other work, but the loss is unfortunate for Maine shipbuilders, whose quality of construction is well-known in Navy circles.

Any decision that shuts the nation’s best shipbuilder out of a competition can hardly be called a wise choice.