They did everything they could to prevent a protest over a contract for a new stealth bomber. Air Force officials had a "red team" of outside attorneys shadowing every step of the procurement process. They added layers of scrutiny, even though it delayed the award. They wanted to make sure any agreement could withstand challenges from the toughest inside-the-Beltway legal muscle.

Then, after the $80 billion contract was awarded to Northrop Grumman in 2105, Air Force officials sat down with the losers, Boeing and Lockheed Martin, to explain how the process unfolded.

It wasn't enough. Boeing and Lockheed protested the decision, arguing that the selection process was "fundamentally flawed," holding up the weapons program for several more months, while the legal dispute was heard.

Concern over the growing number of such protests — the "lawfare" that critics say hinders the government's ability to move ahead with important programs and services — has prompted action by the Senate.

In this year's defense spending plan, the Armed Services Committee has included a provision that would force large contractors — those with annual revenue of at least $100 million — to pay for the delays their challenges cause should they be on the losing side of a protest.

The legislation is of special interest in the Washington area, where many of the nation's largest defense contractors are headquartered and where law firms have established entire practices around federal procurement law.

It is relatively easy to file a protest — the saying in the industry is that the cost is little more than the price of a postage stamp. For years, the number of protests has grown, to 2,789 last year from 2,475 in 2012. As the stakes increase, so do the challenges. An increasing number of high-value contracts — those worth $100 million or more — are being challenged, said Ralph White, who oversees the Government Accountability Office's bid protest division.

Once a contract is protested to the GAO, the agency has 100 days to rule on the challenge. In the meantime, work comes to a halt.

Aneesh Chopra, the former U.S. technology officer, said at a recent panel discussion hosted by Nextgov and Government Executive that losing contractors exploit the system with such frequency that "we should have a shame list and shame the private vendors who protest and don't win."

The Senate provision wouldn't do that. But its "loser pays" provision could force contractors to think twice about the cost of suing their customer.

"The big five defense contractors file a bid protest on autopilot whenever they lose. And this is targeted to help curb that behavior," said a Senate aide who spoke on the condition of anonymity because they were not authorized to speak publicly on the legislation.

Gene Dodaro, the comptroller general, warned that it would be difficult to enact the provision.

"To implement this requirement, GAO would need to develop procedures for tracking the amount of time spent on each protest," he wrote. He also pushed back against a proposal that would force the GAO to speed the review of a protest to 65 days from 100.

The stealth-bomber deal was a once-in-a-generation contract, one that could shape the contours of the defense industry for years. So Air Force officials knew they "couldn't make a mistake," said William LaPlante, then the assistance secretary of the Air Force for acquisitions. "Which of course is hard to do when you have humans involved and thousands of pages of documentation."

The GAO ultimately upheld the award to Northrop, after weighing the matter for three months. But when a program is held up like that it can be "very disruptive," said LaPlante, now a senior vice president of the McLean, Va.-based Mitre Corp.

Although it won that one, Northrop last year lost a protest over a $359 million Air Force contract for electronic warfare technology that was awarded to BAE Systems, a move that is not uncommon among the top defense contractors. Lockheed Martin, General Dynamics, Raytheon and Booz Allen Hamilton filed numerous protests between 2005 and 2015, according to a Pentagon review.

Few contractors consider their legal challenges frivolous.

"We take the decision to file a protest very seriously," said Todd H. Blecher, a spokesman for Boeing's defense, space and security unit. "On those occasions when we have decided to file a protest, it was because we believed fundamental errors were made in awarding the contract."

The Aerospace Industries Association said it was opposed to the measure because "rather than discouraging frivolous bid protests, this provision would create a disproportionate burden on companies that file protests in good faith," spokesman Dan Stohr said. "They invest significant time and resources to consider the facts very carefully and make an informed business decision whether to protest a particular contract award."

It is not just new acquisitions that are targeted with protests. Some companies have challenged decisions to hang on to programs after the work was awarded to a competitor, allowing them to continue to bill the government until the dispute is resolved.

Without speaking directly about the Senate provision, La Plante said that although the government has to be held accountable for holding a fair and thorough process, companies shouldn't be able to gum up the system so easily.

"We need to push accountability out into the system, so that it's not just on the government," he said. "These companies feel accountability to their shareholders, and that's why they protest. But there has to be accountability to the warfighter and to the Department of Defense."

Despite the growth in the number of protests, it is still tiny compared with the number of procurements. And companies need a remedy in case they have been mistreated, said Alan Chvotkin, executive vice president and counsel of the Professional Services Council, a trade group.

Of the nearly 3,000 protests filed last year, more than 20 percent were sustained by the GAO, a jump from years past. And in 46 percent of the cases, the protesters found some form of relief, such as the agency starting the competition over again.

And just because a company loses a protest doesn't mean the challenge is frivolous, said White, of the GAO.

"A company could have all kinds of valid reasons to think they weren't treated fairly and still maybe not prevail in a protest," he said.