Federal air marshals are described as the "last line of defense" against terrorist attacks in the sky, but whether they are living up to their billing is being challenged.

Dwindling ranks, bureaucratic inefficiency and scandal have dogged the agency over the past several years. And lawmakers want proof if the service tasked to "detect, deter and defeat hostile acts" in the air can keep Americans safe, especially as the Islamic State wreaks havoc overseas and terror threats increase at home.

"Is a federal air marshal capable of preventing an IED from being detonated?" Rep. John Katko, R-N.Y., asked at a recent House Transportation Security Subcommittee hearing. "The terrorists are constantly adapting their tactics, and we need to make sure we are not protecting ourselves against yesterday's threats and ignoring the threats of tomorrow."

Unable to give clear examples of when air marshals have stopped terrorist attacks, deputy assistant administrator Roderick Allison told lawmakers that the service, in collaboration with other federal agencies, has played a role in minimizing threats.

"We have thwarted a lot of terrorist attacks. I can tell you, it is known across the world that we have federal air marshals on aircraft."

But to fight terrorists, air marshals have to be present in the air. And currently they are estimated to be on only about 1 percent of U.S. flights, and their ranks are shrinking.

"There are a number of concerning issues with the current state of the Federal Air Marshal Service. First and foremost, the dwindling ranks of the service," Rep. Kathleen Rice, D-N.Y., said at last week's hearing.

This year alone, the Federal Air Marshal Service has seen a staff turnover rate of 6 percent. That and a four-year hiring freeze put the agency in a precarious situation.

Allison told lawmakers "the first thing on [our] wish list in big bold letters would be the ability to hire."

He lamented that his workforce is getting older, and he expects many of the marshals to be "walking out the door" in 2020 or 2021.

For some, the worries over shrinking staff may not add up. Before the Sept. 11, 2001, terrorist attacks, the nation had only about 30 air marshals. That number ballooned after federal legislation in 2002 allowed for the hiring and training of 600 more marshals in just a few months. But others see the dwindling numbers and the increasing terror threats as a need for the agency to beef up again.

Rice said aviation threats are increasing and the service needs to match them.

"We must ensure that our Air Marshal Service is also evolving and maintaining the strength needed to counter these threats and keep passengers safe," Rice said. "The 9/11 attacks made it clear that we needed a much greater presence on commercial aircrafts to counter the threat of individuals attempting to gain access to a cockpit."

But the jump in the numbers of marshals also brought bureaucratic struggle and scandal.

In 2008, more than a dozen air marshals spoke out about cronyism and accused the service of discrimination based on age, sex and race.

Earlier this year, employees told the Center for Investigative Reporting that air marshals were having flights rearranged so that they could have sexual trysts.

The scrutiny has districted lawmakers from examining the air marshals' most important task, ensuring safety in the air. At last week's hearing, Katko questioned whether the air marshals are still needed to meet that task, citing increased efforts by airlines and airport security.

He's not alone in his skepticism. In one of his final reports as a senator before he retired, Oklahoma Republican Tom Coburn expressed similar concerns.

In his January 2015 report, Coburn wrote it's "unclear to what extent the [Federal Air Marshal] program is reducing risk to aviation security, despite the more than $820 million annually that is spent on the program."

In addition, Coburn wondered if other enhanced security screening and safety precautions undertaken by the TSA and airlines have made the air marshals irrelevant.

"For example, a would-be hijacker attempting a plot similar to what occurred on September 11 would likely be stopped by the various screening mechanisms before he is able to board the plane," Coburn wrote. "If he defeated these screening mechanisms, he would encounter a locked cockpit door and potentially an armed pilot in the cockpit, should he attempt a hijacking."

Allison told lawmakers that the need for air marshals is just as important as it was after Sept. 11, despite other safety enhancements.

"No one layer stands on its own," Allison said of aircraft security. "We are starting to think elsewhere where we can be effective and make changes." He said the service is looking at creating a more enhanced model of assessing the risk of individual flights, and how it assigns its marshals to them.

He highlighted the agency's efforts to close four of its 24 field offices by the end of 2016. It closed offices in San Diego and Tampa, Fla., last year in attempts to consolidate the service's field operations in areas with busier airports.

And while the further consolidation holds promise, lawmakers are waiting for proof that air marshals are fighting off terrorists.

For now, lawmakers will have to take Allison's word.