Air travelers have had plenty of complaints in recent years, as airlines have shrunk seats and introduced a variety of new fees. But in the first few months of 2016, one concern began to trump all others: brutally long waits at airport security checkpoints.

TSA lines became unbearably long in early 2016. Image source: Wikimedia Commons user Josh Hallett.

At first, airlines like American Airlines (NASDAQ:AAL), Delta Air Lines (NYSE:DAL), and United Continental (NASDAQ:UAL) reacted by criticizing the Transportation Security Administration (and the government more broadly). But in the past couple of months, they have realized that doing so is pointless. As a result, the airlines have pivoted toward spending money to help the TSA do its job better.

Airlines rip the TSA

Airline passenger volumes have risen rapidly in the past two years, as falling airfares have encouraged more travelers to take to the skies. Meanwhile, Congress cut back on the TSA's funding. As a result, as of early 2016, staffing was down 10% relative to 2013 despite a double-digit increase in passenger traffic.

Congress and the TSA had hoped that lots of travelers would sign up for TSA's PreCheck expedited screening program, as PreCheck security screening is less labor-intensive. However, PreCheck signups have fallen short of expectations. The result was long delays (frequently over an hour) at many security checkpoints earlier this year.

Airlines were furious. An American Airlines spokesperson called the delays unacceptable, saying that nearly 6,800 customers missed their flights due to long security lines during the week of March 14-March 20.

American Airlines was particularly angry about the long TSA lines. Image source: American Airlines.

Meanwhile, leading industry trade group Airlines for America (which counts both American Airlines and United Continental as members) stated that airline check-in processes have become more efficient than ever, but that TSA checkpoints haven't kept up. Airlines for America also told travelers to tweet about any long delays they encountered under the hashtag #iHateTheWait.

An untenable position

In response to the widespread delays and mounting public outrage this spring, Congress gave the TSA some extra money to increase staffing for the summer.

However, the legacy carriers have also realized that they need to step up, especially at their big hubs. Blaming the TSA doesn't do them much good. If customers miss flights due to outrageous security lines, it costs the airlines money (if they rebook those travelers for free) or loyalty (if they don't offer complimentary rebooking).

As a result, American Airlines, Delta Air Lines, and United Continental have opened up their checkbooks to shrink airport security lines. Fortunately for travelers, the combined efforts of the TSA and the airlines have dramatically reduced wait times in the past couple of months.

Reducing wait times -- in the short term and long term

In the short term, airlines have hired extra airport staff to assist the uniformed TSA personnel. Certain tasks -- like moving bins from the end of the security line back to the beginning -- don't actually need to be performed by TSA workers. By taking over these tasks, American, Delta, and United have enabled the TSA to open more lines than would have otherwise been possible.

The long-term fix involves making TSA checkpoints more efficient. In late May, Delta Air Lines paid for two "innovation lanes" at its Atlanta hub, featuring five separate stations for people to place their bags on the conveyor belt. It also installed an automated system to move bins back and forth.

These lanes succeeded in speeding up passenger flow through the TSA checkpoint. In recent weeks, American Airlines and United Continental have announced plans to deploy the same system for TSA checkpoints at several of their hubs.

Airlines have also encouraged more of their travelers to sign up for PreCheck -- or in Delta's case, for Clear: a private alternative that also offers expedited security screening. The airlines have even offered to pay some or all of the cost of enrolling in these programs for their elite-level frequent fliers.

It's amazing how quickly airlines have reversed course from blaming the TSA to partnering with the beleaguered government agency. But they didn't really have a choice. Their customers just want a smooth experience. It's easier for airlines to make that happen by working with the TSA -- even if it adds some costs -- than by railing against Congress and the TSA.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.