Competition for government contracts is becoming more cutthroat as federal spending shrinks by billions of dollars, with big companies swooping in on smaller ones and bid protests on the rise.

Routine contracts that in years past would have attracted just a handful of companies have become high-stakes bidding wars. Contractors are forced to make more aggressive offers, with slimmer margins. And industry officials say the gentleman’s agreement that often prevented losing companies from filing bid protests against their rivals has given way to a more desperate mentality.

The number of losing companies’ protests to the Government Accountability Office, which handles the vast majority of bid protests, has increased from 1,352 in 2003 to 2,429 last year. While that is a fraction of the total number of contracts awarded annually — less than 1 percent, by one estimate — the cases often show how tight the market has gotten and the extreme measures companies will take to win.

“Budgets are going down, which means competition for what contracts remain has increased tremendously,” said Jaime Gracia, president of Seville Government Consulting, which helps contractors win bids. Companies “are making strategic decisions about protesting because they have to. A lot of companies can’t afford to lose that contract.”

After the terrorist attacks of Sept. 11, 2001, spending on contracting soared. Fueled by the wars in Iraq and Afghanistan, it peaked in 2008 at about $541 billion, according to the Office of Management and Budget. But as the budget cuts known as sequestration went into effect, the figure dropped to $461 billion last year, and many predict it will continue to fall.

The shakeout has been drastic and sudden, forcing even big companies to battle for relatively small contracts. That, in turn, will force out many companies whose “survival depends on a level of demand that no longer exists,” said Loren Thompson, a defense industry consultant.

Companies sometimes can benefit simply from the act of protesting.

After holding the contract to haul garbage and recycling at Fort Lee in Virginia for nine years, Mark Dunning Industries lost to a competitor when the contract was rebid in 2011. MDI protested the decision to the GAO twice, as well as to the Small Business Administration.

Its arguments were rejected by both agencies. But by that time, two years had passed — which provided two more years of work for MDI before it had to relinquish the contract.

“It was obviously a contract we wanted to keep, and with the federal budget getting cut, every installation is looking at reducing services,” said Brad Dunning, MDI’s controller. “Some of our contracts have gone down in value.”

But he said the company’s protests were based on merits, because MDI believed its competitor should not have qualified as a small business. “Every time we’ve [filed a protest], there’s been a legitimate reason,” he said. “It’s not to string out the government.”

Some companies have issued stark warnings to shareholders about what lies ahead.

“We may not be able to continue to win competitively awarded contracts,” L-3 Communications, a defense contractor based in New York, wrote in a recent regulatory filing outlining possible threats to its business. “We expect increased competition because of the uncertainty of future U.S. defense budgets.”

In 2009, when the Department of Homeland Security requested proposals for all kinds of support services, it got an astounding 666 bids for 34 contracts. This year, as it prepares to rebid the program, it is warning companies the competition is going to be even fiercer.

Even the “industry day,” where agency officials meet with potential bidders to discuss the requirements for contracts, was so popular that it was “like camping out in line to get tickets to a big concert,” said one company official, who spoke on the condition of anonymity out of fear of reprisal.

But more competition can mean a better deal for taxpayers — something the Obama administration has tried to foster.

“This is a potential windfall for the government in that it gets a lot of choice and has the opportunity to book at remarkably low prices,” Thompson said.

The protests also show just how heated some of the disputes can be, and some agencies have come to expect them when awarding lucrative contracts.

There used to be a “huge stigma around protesting,” said Lee Dougherty, a partner at Fluet, Huber and Hoang, a Woodbridge law firm. “You would get a black mark and be seen as a troublemaker.” Now, he said, agencies “understand it’s part of the landscape.”

The General Services Administration has worked hard to communicate with potential bidders about the requirements of contracts in a concerted effort to head off protests. It even has appointed an ombudsman to handle industry feedback.

“Minimizing potential protests is a top priority for GSA,” said spokeswoman Mafara Hobson.

Still, the agency knows that as spending dries up, companies are going to go down fighting. Protests are “simply the nature of the business, and we must be prepared,” Hobson said.

But there are ways to head off lengthy conflicts, said Jim Williams, who has held executive positions at the Internal Revenue Service and GSA. The key is for government agencies to talk to contractors about how they can best suit the government’s needs, he said. Too many agencies cut off communication with companies out of fear that what they say may be used against them in a protest or lawsuit.

“There are agencies that are abysmal at communicating with industry,” Williams said. “They think that by hiding the ball, they’re going to avoid protests.”

In some cases, competition is so tight that companies protest even before awards are granted. Recently, for example, General Dynamics filed a protest with the Army, arguing that the rules for a new armored vehicle were written so that they unfairly benefit the company’s competitor, BAE Systems.

The protest and a congressional lobbying campaign demonstrate “the severe impact that the reduction in procurement programs has had,” said Mark Signorelli, BAE’s vice president and general manager for combat vehicles. It’s indicative of “the lengths to which companies are prepared to go to be able to compete.”

A spokesman for General Dynamics declined to comment. Its protest was denied by the Pentagon late Friday.

While not taking a side in the dispute, Thompson said that the fight over the armored vehicle is emblematic of “the end of the good times and the coming of a cutthroat competitive environment in which some companies won’t survive.”

Disputes over contracts are not always bad, and in fact can help the system function better, said Daniel Gordon, former administrator for federal procurement policy in the Obama administration. Protests provide “a good safeguard” by allowing companies to highlight what they feel are errors in the process, he said.

Gordon also noted that protests are rare in proportion to the gigantic federal procurement system, and that they are driven by many factors other than reduced federal spending. In fact, he said, protests had begun to climb even before spending started to shrink. The GAO rules quickly on most protests, Gordon said, which helps prevent disputes from disrupting government services.

But as companies fight over a shrinking pool of government dollars, they will push the system to protect their interests.

Gregory Waugh filed a protest after losing a government contract that was as small and simple as they come: no multibillion-dollar fighter jets or complicated computer systems, just padlocks, 6,000 in all. To the Pacific Lock Co., the deal was worth only about $25,000, but Waugh, the company’s president, didn’t take it lightly when he lost.

Waugh suspected his competitor wasn’t playing fair, so he filed a protest alleging that his rival couldn’t meet one of the Pentagon’s requirements: that the locks had to be manufactured in the United States.

It was a long shot that was flatly denied in late 2011 by government lawyers. But Waugh has no regrets about fighting for work, especially as federal spending tightens. He had never had to compete against the company that ended up winning the contract. He wanted to ensure that the Defense Department checked that it was manufacturing the locks domestically, as required.

“I just want to make sure that who I’m competing against is following the same rules that I am,” he said. “Now you’re starting to see other companies pop up and be successful. I’m okay with that. But so that means we need to be more competitive.”