As the opioid crisis has mushroomed into a national epidemic, the number of truck and bus drivers, commercial pilots, railroad operators, and pipeline workers who failed federal drug tests has jumped by 77 percent since 2006, federal data shows.

Transportation companies with workers who hold “safety sensitive” jobs are required to test at least 25 percent of their workforce each year, although in some industries there is more regular and stringent testing. Nearly a million more workers are now being drug tested as the transportation industry has rebounded from the recession to employ more workers.

The drug testing data was obtained from the Transportation Department by Democratic staff members on the House Transportation and Infrastructure Committee, who followed up on reports in 2016 about drug abuse by railroad workers.The Democratic staff members plan to release a report on their findings Thursday.

In a letter to Transportation Secretary Elaine Chao and two other administration officials, Rep. Peter A. DeFazio (Ore.), the ranking Democrat on the Transportation Committee, wrote Thursday that “DOT is effectively carrying out drug and alcohol testing requirements . . . but there are significant gaps . . . that should be addressed.”

The National Survey on Drug Use and Health concluded that 10.9 million people misused opioids in 2016, and the Centers for Disease Control and Prevention put the number of deaths at a record 42,000. The number of deaths that year from synthetic opiates such as fentanyl doubled from the previous year to 19,413.

Although there is no evidence that either engineer was under the influence of drugs or alcohol, a pair of recent Amtrak train wrecks in South Carolina and Washington state have increased scrutiny of commercial transportation.

Investigators have found drug use to a be a factor in several other high-profile transportation mishaps.

• When a container ship collided with a bridge and spilled 53,500 gallons of fuel into San Francisco Bay in 2007, the National Transportation Safety Board found the harbor pilot had taken high doses of three opioids and several other prescription medicines.

• The driver of a tractor-trailer that collided with a bus in Oklahoma, killing four softball team members in 2014, was found by the NTSB to have been high on synthetic cannabinoid.

• Another tractor-trailer driver, this one in Tennessee in 2015, struck eight vehicles, killing six people. He tested positive for amphetamines.

• A hot-air balloon operator who died in Texas, along with 15 passengers, in 2016 tested positive for several drugs, including Valium, oxycodone and a synthetic narcotic pain medication.

• When an Amtrak train outside of Philadelphia killed two members of a crew working on the rail bed, the engineer tested positive for marijuana, and the two dead workers were found to have a variety of drugs in their systems.

The drug test failure rates are computed in fractions that belie the mayhem than can result if a bus driver, rail engineer, pilot or pipeline worker in a “safety sensitive” position is under the influence.

Aviation workers failed the tests in 0.6 percent of cases; bus and truck drivers by 0.8 percent; railroad workers by 0.4 percent; transit workers by almost 1 percent; U.S. Coast Guard licensed operators by 0.9 percent; and pipeline workers by 1.1 percent.

The number of failed drug tests by railroad workers involved in fatal wrecks in 2016 alone was three times higher than a decade ago, and the highest number since the Federal Railroad Administration (FRA) began keeping records in 1987.

The report by House Democratic staff members makes 15 recommendations. One is that the broad range of testing done by the FRA, including blood tests in addition to urine sampling, be applied by the Transportation Department to all crash investigations.

It says federal regulators should renew discussions with their counterparts in Canada and Mexico to bring workers whose pipelines feed into U.S. systems into testing programs similar to those mandated by Congress.

The Federal Aviation Administration, the report says, should finalize arrangements for testing at offshore maintenance facilities that host the planes of U.S. carriers. The report also recommends creation of a single template for drug testing among all DOT and Health and Human Services agencies and that it be expanded to include drugs not already covered by the testing protocols.

It also says that a “scientifically valid and legally defensible” means to test for marijuana impairment be developed for the federal testing program.

The report also recommends that DOT provide regular public reports on the drug and alcohol testing program by each mode of transportation.

“There are significant gaps that should be addressed to mitigate risk and improve transportation safety,” DeFazio said. “I urge the Department to consider the findings and recommendation made in the report, to ensure the safety of our roads, rails, pipelines, navigable waters, and skies.”

Correction: An earlier version of this story reported inaccurately that transit workers failed the drug tests by almost 10 percent. The correct number is 1 percent, and the story has been updated.