NEW YORK – Chinese drug traffickers had some advice for American buyers of fentanyl: Let us ship it to you by regular mail. It might be slower than FedEx or UPS, but the opioid is much more likely to reach its destination through the U.S. Postal Service.

These cyber drug dealers wrote their U.S.-based customers – in emails later uncovered by federal investigators – that private delivery companies electronically tracked packages, allowing the easy identification of mail from suspect addresses and creating a bright trail connecting sellers and buyers of illegal fentanyl.

The Postal Service for years did not institute similar safeguards – and that gaping hole in the nation’s borders has not been fully closed despite legislation compelling its elimination. Fifteen percent of all packages from China are still not electronically tracked, and the figure rises to 40 percent for all packages from around the world entering the United States.

“What do we not know about these packages that are coming in?” Frank Russo, the U.S. Customs and Border Protection port director at John F. Kennedy International Airport, said in an interview.

“When you’re talking about a million packages a day,” he said, noting the amount of international mail arriving at JFK alone, “40 percent is a large number.”

On Wednesday, the Trump administration sanctioned three Chinese nationals accused of trafficking fentanyl, identifying two of them as “significant foreign narcotics traffickers.” Treasury Undersecretary for Terrorism and Financial Intelligence Sigal Mandelker said the “Chinese kingpins” directly contributed to the nation’s opioid addiction crisis by shipping hundreds of packages of synthetic opioids to the United States.

“The most common distribution medium is via the U.S. Postal Service,” the Treasury Department said in a statement announcing the sanctions.

The illicit use of the U.S. mail system, widely recognized but unaddressed for years, was just one in a number of persistent vulnerabilities at the nation’s ports of entry and in international mail centers as the fentanyl epidemic metastasized and tens of thousands of Americans died, according to dozens of interviews with law enforcement officials and lawmakers and internal government documents.

Thomas Overacker, executive director of cargo and conveyance security for Customs and Border Protection, told Congress in July that his agency is able to inspect only about 2 percent of cars and 16 percent of commercial vehicles that come across ports of entry at the southwest border – another major conduit for fentanyl.

CBP has experienced a critical shortage of officers and trained dogs. Last year, then-Sen. Claire McCaskill, D-Mo., released a report concluding that the agency had 4,000 fewer officers at the nation’s ports of entry than were needed.

“At the very least, we need to ensure that our ports are adequately staffed and equipped to deal with this problem – and right now that’s simply not the case,” McCaskill, who lost reelection last November, said in a statement at the time of the report.

Such warnings have been sounded for years.

Four years after the fentanyl epidemic began in 2013, Customs and Border Protection was not deploying enough officers or portable spectrometers that could detect the drug to make a significant dent in the flow of the synthetic opioid, according to government reports and interviews.

Dogs also were not trained to detect fentanyl at any ports of entry, including in the mail, until 2017. That was two years after the Drug Enforcement Administration alerted that the drug was being ordered over the internet and shipped directly to U.S. mailboxes from China or smuggled in vehicles or containers crossing the border from Mexico.

Fentanyl – 50 times more potent than heroin – has fueled the deadliest drug epidemic in American history. From 2013 through 2017, more than 67,000 people died of synthetic-opioid-related overdoses, the majority of them from fentanyl. In 2018, another 31,473 Americans died, according to the latest available figures from the Centers for Disease Control and Prevention.

While prescription opioid overdoses fell last year, deaths from fentanyl rose, according to provisional data in a CDC report released in July. Fentanyl is the third wave of the opioid epidemic, which began with prescription pills, migrated to heroin and then morphed into the current crisis.

Responding to the Sept. 11, 2001, attacks, Congress passed a law in 2002 requiring advanced electronic data on every package coming into the United States through commercial companies, such as UPS and FedEx. Lawmakers feared terrorists could mail biological and other weapons into the country, and they needed a way to track suspicious parcels.

But the legislation exempted the Postal Service, which feared the new regulations would slow down delivery and be too costly to implement. Under the law, the secretaries of the treasury and homeland security were supposed to consult with the U.S. postmaster general to determine whether it was “appropriate” for the Postal Service to require the tracking data.

No such consultation ever happened, according to government officials.

In 2018, Congress passed another tracking law, this time to try to stanch the flow of fentanyl coursing through the mail. The measure requires that all packages from foreign countries include tracking data, but the Postal Service tried to defeat the measure and has still not implemented all the safeguards required, such as tracking the senders and receivers of all packages from China, according to Sen. Rob Portman, R-Ohio, who co-sponsored the bill.

“How much longer is the post office going to sit on this, and how many people have to die before the post office gets serious about this?” Portman said in an interview.

The Postal Service said it is moving as quickly as it can to comply with the law.

The failure to address weaknesses in the country’s ability to prevent the widespread import of narcotics was also compounded by a turf war between key federal agencies. CBP officials focused on stopping illicit drugs were pitted against a U.S. Postal Service that argued it needed fast-flowing mail to aid commerce.

In 2015, for instance, the two agencies agreed to start a pilot program to improve the inspection and interdiction of international packages, according to a 2018 Senate Permanent Subcommittee on Investigations report.

Under the program, the Postal Service would receive advanced electronic data before packages entered the United States and then forward information to CBP officials, who would scrutinize mail identified as suspicious. The effort was to start at the postal facility at JFK International Airport – one of five international mail centers in the United States. CBP officials were supposed to target small packages from China that were under 4.4 pounds, known as ePackets.

From the start, the program faltered. Postal officials did not send all of the suspicious packages to CBP, even though the two agencies have adjacent facilities at JFK. The Senate report blamed “a lack of forethought and cooperation, conflicting missions, and interagency personality conflicts.”

An unnamed CBP official was accused of refusing to cooperate with the Postal Service. The CBP official ultimately was reassigned, according to the report, but the program ground to a halt.

The value of cooperation and technology – and the costs of not securing it earlier – could be seen during a visit last fall to the cavernous and decrepit CBP building inside New York’s JFK International Airport, where the U.S. Postal Service initially screens the river of incoming packages and then forwards suspicious ones to CBP for further examination.

A CBP officer inspected a small package mailed from China. Wearing protective gloves, the officer carefully lifted a plastic bag of white powder out of the box destined for a town near Atlanta. He held the bag up to a portable spectrometer. Within seconds, the newly deployed device identified what was inside: 221 grams of fentanyl – enough to deliver lethal doses to about 110,000 people. The fentanyl was turned over to Homeland Security Investigations for what is known as a “controlled delivery” monitored by law enforcement. Multiple attempts to carry out controlled deliveries to the address on the package were unsuccessful, according to Russo. CBP declined to provide the name of the package’s recipient, citing an open investigation, and officials said they have not seen any other shipments to the Georgia address.

‘Cat-and-mouse game’

The San Ysidro Port of Entry in San Diego is the busiest border crossing in the Western Hemisphere. Every day, more than 90,000 people – including 70,000 passengers in 45,000 cars – walk or drive across the border where U.S. Interstate 5 begins just north of Tijuana.

San Ysidro also is one of the biggest gateways for illicit drugs into the United States. Mexican cartels smuggle across, in ever-increasing quantities, fentanyl powder mixed with heroin or pressed into counterfeit prescription pills.

Overacker testified in July that his agency seized about two pounds of fentanyl in 2013. Last year, the agency seized more than 2,100 pounds, most of it at the southwest border.

“Through June of this year, we have already seized as much as we did last year,” Overacker testified at the hearing before a House Energy and Commerce subcommittee on efforts to stop fentanyl from entering the country.

President Donald Trump maintains that a wall along the southwest border will stem the flow because agents are seizing large amounts of fentanyl being smuggled between ports of entry. But CBP officials say the vast majority of fentanyl is seized from vehicles driving through official crossings.

“Roughly 90 percent of what we seize is at a port of entry as opposed to in between the ports,” Overacker testified.

Last year, for instance, CBP officers made their largest-ever seizure of fentanyl at the Nogales port of entry in Arizona, a crossing frequently used by the Sinaloa cartel. They found 254 pounds of powder and pills – enough for millions of lethal doses. The drugs were found in a secret compartment in the floor of a truck hauling cucumbers after scanning equipment detected an anomaly inside the vehicle. A drug dog alerted officers to the narcotics.

In 2016, Sen. Ron Wyden, D-Ore., wrote to then-CBP Commissioner Gil Kerlikowske, asking what he was doing about fentanyl. “Does the agency have sufficient staffing at the border for drug control?” Wyden asked.

Three months later, Kerlikowske replied that the import of illegal opioids like fentanyl was increasing “at an alarming rate.”

CBP didn’t have the capability to identify fentanyl through field-testing at most of the country’s ports of entry, he said, and laboratory testing could take up to a year. Staffing, he said, was clearly insufficient.

“CBP field offices,” he wrote, “are currently experiencing critical shortages.”

On a recent morning, a CBP officer and his drug-sniffing German shepherd walked through 26 lanes packed with cars coming up from Tijuana into San Ysidro. The dog alerted the agent to something suspicious inside a white Ford F-150 FX4 truck. They found a waterproof bag of methamphetamine floating in the gas tank.

That same morning, officers found meth hidden inside spare tires in two vehicles.

“It’s a cat-and-mouse game,” said Sidney Aki, CBP’s San Ysidro port director for the past seven years. “They understand today we’re focusing on spare tires. And they’re fluid and flexible. They’ll change to gas tanks. Then we’ll catch on and focus on gas tanks. Then, they may move to roofs and transmission areas.”

Tensions can run high amid the car exhaust fumes and honking horns. The waits can take hours. An initial screening can be followed by a trip to a secondary inspection garage, where officers deploy imaging technology; once, they found a man sewn into the upholstery of a passenger seat.

Detection dogs can alert officers to 19,000 types of explosives, while other canines are trained to smell marijuana, cocaine, methamphetamine, heroin, opiates and LSD. But the drug dogs were not trained to detect fentanyl until 2017. The San Diego field office has about 60 drug detection dogs, but CBP officials want more. So far, the agency has trained 450 dogs to detect fentanyl since the spring of 2017.

“If we had a squad of canines and their handlers dealing with every lane at every port of entry around the nation, that would certainly cut down on a whole lot of drugs coming in that fashion,” said Ralph DeSio, who has been with the agency along the San Diego border for 23 years.

In addition, the acute shortage of CBP officers on the border has only gotten worse. Last year, the situation was so dire that the government began pulling screeners from U.S. airports and reassigning them to the southwest border.

“There’s no question that the current conditions on the southwest border have caused us to shift our personnel,” Overacker said.

This spring, the Government Accountability Office revealed that CBP has about 19,500 agents – almost 7,000 below its target level, and the increase in migrant border crossings has taken more personnel away from drug interdiction.

“In recent years, CBP has not been able to attain its statutorily-established minimum staffing levels for its Border Patrol agent positions or its staffing goals for other law enforcement officer positions, citing high attrition rates in some locations, a protracted hiring process, and competition from federal, state, and local law enforcement agencies,” Rebecca Gambler, director of Homeland Security and Justice division of the GAO, wrote in a March report.

In the past fiscal year, only three Border Patrol agents were added along the southwest border, according to CBP.

‘Fentanyl for sale’

Washington moves slowly.

About five years ago, after a spike in deaths in Ohio, Portman pressed the sheriff and local police in Dayton about fentanyl.

“I asked them, ‘How is it getting in?’ ” Portman recalled. ” ‘Where is it being delivered? Is this coming through the cartels?’ “

“I asked them, ‘Our U.S. mail system is sending this in?’ They said, ‘Yes, that’s how it’s coming in,’ ” he said.

The U.S. Senate Permanent Subcommittee on Investigations, which Portman chairs, launched the probe into fentanyl trafficking. Several investigators from the Department of Homeland Security worked undercover as part of the inquiry and focused on six fentanyl suppliers, five based in China, that were selling the drug over the Internet.

Eighteen months later, in January 2018, the subcommittee released its report.

The investigators found the suppliers they targeted – which sent hundreds of packages to more than 300 people – by using simple Google searches such as “fentanyl for sale.” The suppliers said they preferred to ship fentanyl through regular express mail.

Portman’s investigation disclosed that seven people died from fentanyl overdoses after buying the drug from the small group of online sellers the inquiry had focused on. One of the deceased, an Ohio man, paid $2,500 for 15 packages he received between May 2016 and February 2017.

In the fall of 2018, the Senate passed a bill introduced by Portman called the STOP (Synthetics Trafficking and Overdose Prevention) Act. It required all senders of international mail packages to provide basic shipping information to CBP, including the name and address of the shipper and the recipient of the package.

The Postal Service initially opposed the bill, according to Portman.

“They just said it was impractical and too costly,” Portman said.

Robert Cintron, vice president of network operations management for the Postal Service, testified before the Senate that the legislation could potentially force his agency to stop accepting mail from many countries.

“The blocking of inbound mail destined for the United States could also lead other countries to block outbound mail originating in the United States,” Cintron testified.

Cintron also said the STOP Act would impose “enormous new costs,” estimated at $1.2 billion to $4.8 billion over a decade. The Postal Service has struggled financially for years.

Portman’s bill passed Congress with bipartisan support in October, less than two weeks before the midterm elections, but years after local officials, such as those in Dayton, were imploring Congress for help. Trump signed it into law.

It required the Postal Service to have advance electronic data on 70 percent of all packages mailed from abroad and 100 percent on all packages mailed from China by Dec. 31, 2018.

Postal officials missed the deadline.

At the July congressional hearing, Gary Barksdale, the chief postal inspector for the United States, said his agency is now receiving advanced electronic data on 85 percent of packages from China, compared with 32 percent in 2017, and on 60 percent of all inbound packages, compared with 26 percent two years ago.

“This represents a significant improvement within a relatively limited period of time,” Barksdale said.

David Partenheimer, a Postal Service spokesman, said the agency “fully supports and is aggressively working to implement [the law] to keep dangerous drugs from entering the United States from China and other countries.

“As it has done throughout its history, the U.S. Postal Service is committed to taking all necessary actions to combat criminal use of the mail as it continues to provide reliable and efficient service to the American public,” he said.

The administration had also expected help from Chinese authorities. On Dec. 1, 2018, Trump met Chinese President Xi Jinping for dinner in Buenos Aires at the Group of 20 Summit. The White House said Chinese officials had promised to help halt the export of fentanyl to the United States.

“President Xi, in a wonderful humanitarian gesture, has agreed to designate Fentanyl as a Controlled Substance, meaning that people selling Fentanyl to the United States will be subject to China’s maximum penalty under the law,” then-White House press secretary Sarah Sanders announced.

The fentanyl ban was due to take effect on May 1, 2019.

But on Aug. 1, Trump accused his Chinese counterpart of reneging.

“My friend President Xi said that he would stop the sale of fentanyl to the United States – this never happened, and many Americans continue to die!” the president said in a tweet.

The Washington Post’s Nick Miroff and Katie Zezima contributed to this report.