Your legroom and your patience for bag fees shrank in 2017, but there was one historic positive outcome for air travelers. Not one person died in an accident on a commercial passenger jet the entire year, the safest year ever, according to two airline safety groups.

That does not mean 2017 was a year without aircraft crashes that killed passengers. Dutch aviation consult group t070 and the Aviation Safety Network found no fatalities because of accidents involving large commercial jets most popular with civilian passengers.

Those important distinctions exclude deaths involving military and cargo airline crashes and accidents involving smaller, propeller-powered aircraft, like the 12 passengers killed in a Cessna crash in Costa Rica on Sunday in the closing hours of the year, and the 16 U.S. troops killed in a cargo plane crash in July. Two crashes involving turboprop planes were recorded by to70, in which 13 people died.

The Aviation Safety Network estimated there were nearly 37 million flights in 2017, more than any year in history, meaning that aircraft mishaps are declining even as the number of flights continues to rise. The last commercial jet airline crash in which more than 100 people were killed was on Oct. 31, 2015, when 224 lives were lost after a flight from Russia broke apart in Egypt. The ASN, which tracks crashes using different metrics than to70, showed 10 recorded crashes involving small propeller planes and cargo aircraft, killing 44 passengers and 35 people on the ground in 2017. In 2016, the group counted 16 accidents with 303 dead.

The decline is a remarkable outcome for commercial airliners that managed to evade airborne disasters but racked up numerous fiascoes involving testy passengers and hostile crew. The combination of more flights, social media, rising fees and diminishing personal space have sparked a renaissance of air-passenger outrage. United Airlines stock plunged after video of a bloodied man dragged off a flight went viral; a Japanese airline apologized after a man who used a wheelchair had to climb a staircase on his hands; and a jolt of turbulence injured 10 on an international American Airlines flight, sending coffee into the overhead cabin lights.

Adrian Young, to70’s senior aviation consultant, told The Washington Post that newer technology and enhanced aircrew training have all contributed to the improved safety record. Planes are crashing less often, and when they do, passengers are surviving them at higher rates. Cabins are more flame resistant and are built to evacuate more effectively than in the past.

“Cabin safety has improved by leaps and bounds since the 1970s and ’80s,” Young said. But he also cautioned that dips in aircraft crash fatalities are not indicators of a completely safe environment. Aviation is a “risk-laden business,” he said, and accidents involving large, modern engine malfunctions are a cause of concern. For instance, an Air France aircraft suffered catastrophic damage to an engine during an international flight in September, forcing it to land.

Yet passengers and their high-tech devices may provide the greatest risk to flights moving forward, Young said. Lithium batteries common in laptops, smartphones and tablets can overheat and ignite, and their proliferation may lead to disaster in the air.

“A big lithium ion fire can be greater than capacity of the fire extinguishing system to stop it,” Young said. “That’s the risk.”

President Donald Trump took credit for the historic safety record. He was “very strict” on commercial aviation during his first year in office, he tweeted Monday.

He tweeted: “Since taking office I have been very strict on Commercial Aviation. Good news – it was just reported that there were Zero deaths in 2017, the best and safest year on record!”

The credit for 2017’s safety record does not belong to one person, said John Cox, chief executive of Safety Operating Systems, an airline safety consultant group. “It was the work of thousands of people over decades. It’s not a one-year phenomenon,” Cox, a retired pilot. told The Post. Airline regulators, manufacturers, maintenance crews, dispatch crews and others all played a role, Cox said. When asked what the most dangerous part of flying can be, Cox often says it’s driving to the airport.

Follow the Bangor Daily News on Facebook for the latest Maine news.