NEW YORK — The government is trying to put a stop to rising airfares and fees by blocking the latest airline merger — but for fliers, it’s already too late.

The past decade has seen the largest transformation of the airline industry in a generation. Prior to 2005, there were nine major U.S. airlines. Today, just five.

The merger of American Airlines and US Airways would bring that number down to four. But Tuesday, the Department of Justice moved to block the deal, saying it would cost consumers hundreds of millions of dollars a year in higher fares and extra fees.

But even before this, the cost of flying had gone up for consumers as the industry consolidated. The average cost of a roundtrip domestic ticket — including baggage and reservation change fees — grew to $378.62 last year, up from $351.48 in 2008, when adjusted for inflation.

The American-US Airways merger would create the world’s biggest airline and help propel American out of bankruptcy court protection. For smaller US Airways, the deal represents a chance to be a significant player in global aviation and to better compete with the larger airlines that now dominate the market.

The airline industry has been searching for stability ever since the government stopped regulating routes and prices in 1978. Companies that once had profitable monopolies suddenly faced startups that undercut their fares. Since deregulation, 195 airlines — small and large — have filed for bankruptcy. Some emerged stronger. Some stopped flying. Others survived only through mergers.

While deregulation created havoc for the airlines’ bottom line, it did open up flying to the masses. Air travel used to be only for the rich. In 1979 — the first year after deregulation — a roundtrip domestic ticket cost $590.49, when adjusted for inflation. As new airlines started flying, prices fell dramatically. Mergers have reversed that trend.

The latest round of consolidation started in 2005, when America West bought US Airways out of bankruptcy, taking its name. Then Delta and Northwest merged in 2008, followed by United and Continental, and Southwest and AirTran. All of those easily won the blessing of antitrust regulators — the first two under President George W. Bush, the second pair under President Barack Obama.

Andy Brennan, an analyst with IBISWorld, said the government approved those deals to save the then-struggling industry. Now that the airlines’ health has improved, regulators are more concerned about airfares.

“While there’s still a bit of turmoil and volatility in the economy, it’s much more stable than it was only a few years ago,” Brennan said.

The number of players in the European industry has shrunk as well, with the mergers of Air France and KLM, British Airways and Iberia, and Lufthansa with Swiss and Austrian.

Consolidation has made the airlines more stable, provided job security for thousands of employees and rewarded Wall Street investors. Business travelers have benefited from more flight options and easier connections. But families looking to go on vacation face higher fares and fewer airlines to choose from.

“It’s too late. It’s already a very consolidated industry,” said Savanthi Syth, an airline analyst with Raymond James. “I don’t know if you want to stop an industry from being profitable.”

In seeking to stop the American-US Airways deal, the government contends that airlines already follow each other’s moves in setting prices and adding new fees. They even bully each other out of offering sales.

For instance, on April 18, United Airlines increased its fee for changing a reservation from $150 to $200. Like lemmings, American, Delta Air Lines and US Airways all matched the higher fee within two weeks. Even JetBlue Airways — which has largely resisted fees — increased its change fee by 50 percent.

In the past, passengers might have balked at such fees and boycotted a particular airline. Today, they have no choice but to pay because of fewer options.

The airlines instituted many of the fees in 2008, when the price of fuel spiked 46 percent and the Great Recession sharply curtailed travel. Fuel prices are slightly lower today and travelers have returned to the skies. But airlines rely even more heavily on fees as a source of revenue, while increasingly catering to the highest-paying customers.

Airlines have taken their newfound profits and reinvested in new airplanes. That has led to some improvements for passengers, most notably individual TV screens and Wi-Fi. But those features really just distract fliers from the realities of modern air travel: no pillows or blankets, less legroom and no hot meals.

At the same time, those fare wars that once allowed families to sneak away for a cheap vacation are quickly disappearing.

To deter aggressive discounting, the airlines have set up mutually assured destruction mechanisms known as “cross-market initiatives.” If one airline discounts fares on a route that is highly-profitable for another airline, the affected competitor often responds with discounts in another market that hurts the first airline.

In the fall of 2009, US Airways lowered fares to Philadelphia on flights from Detroit, an extremely profitable hub for Delta. In turn, Delta lowered its fares between Washington D.C. and Boston, one of the more-profitable routes for US Airways. The message was heard and US Airways quickly bailed on its Detroit sale.

The big airlines are all now playing by the same rulebook: They are keeping planes full, cutting unprofitable flights to small towns and not encroaching on the other guys’ territory.

And all of this has occurred while American and US Airways were separate companies.