Sometimes two campaign promises can conflict. This happened after the Trump administration poured more resources into prosecuting migrants for crossing the Southwest border earlier in the year. What followed was a significant slowdown in the pursuit of drug traffickers, another key administration priority.The decline turned around after Trump aides dispatched more lawyers to the border.But the drop in drug prosecutions was eye-popping. Such cases declined by 24 percent in the six months after the Justice Department imposed a “zero tolerance” policy on migrants in early April, compared to the same period last year.While the number of cases along the border has been generally decreasing in recent years, the decline accelerated immediately after the new policy, and by June had led to the fewest prosecutions in two decades.Criminal charges for immigration violations — mostly illegal border crossing, a misdemeanor on the first offense — soared between April and September of this year to 60,684 in the five federal judicial districts on the border from Texas to California, a 121 percent increase from the same period a year earlier.The drop in drug prosecutions was not because the flow of drugs slowed: While Customs and Border Protection seizures of marijuana and cocaine have declined, the agency seized more heroin, fentanyl and methamphetamine over the past fiscal year than it did in 2017, when those drugs helped drive the number of overdose deaths in the United States above 70,000.“When you decide to ratchet up something like prosecuting people for the attempted crossing of the border, you have to ratchet something else down, and it’s pretty clear that’s what happened to drug smuggling,” said Cecilia Muñoz, head of the White House Domestic Policy Council during the Obama administration.In other parts of the country, federal drug prosecutions rose modestly between April and September, compared with the same period last year.The plunge in the border districts was most acute in June — when drug cases dropped by almost half compared with those in June 2017 — but the numbers have since recovered. In September, drug prosecutions were just two percent lower than the same month last year.The reasons for the rebound were unclear, but it could reflect an reallocation of resources in response to the zero tolerance policy. About two dozen lawyers have been sent to the border districts from the Defense and Justice Departments, according to a Justice Department spokesman. The number of immigration prosecutions has remained elevated, and the number of arrests by the Border Patrol in those districts was higher in September than in April.Case-by-case records on immigration and drug prosecutions were analyzed for The New York Times by the Transactional Records Access Clearinghouse at Syracuse University, known as TRAC, which compiles data obtained through continuing court litigation with the Justice Department.Researchers said the data were striking. “We cannot say for certain why we saw a dip in those numbers coinciding with the rise in immigration prosecutions, but it is likely that those two things are related,” said Christine Mehta, an assistant research professor at TRAC and Syracuse’s S.I. Newhouse School of Public Communications.The Justice Department spokesman, Steven J. Stafford, disputed any link between zero tolerance and the drop in drug cases, and cautioned against reading too much into the numbers. He said other factors — including the weather and a change in how prosecutors log charges into a database — could explain part of the decline. He also noted that drug charges along the border had already been dropping.To some experts, the reasons for the steep decline this year were clear: The focus on prosecuting everyone who crossed illegally diverted resources from fighting more serious crimes.“That has to be it,” said David Iglesias, who served as the United States attorney in New Mexico from 2001 to 2007 as a George W. Bush appointee and is now director of the Center for Faith, Politics and Economics at Wheaton College. “There is a finite number of federal prosecutors, and there’s only a finite number of courtrooms.”Mr. Iglesias said the new policy reversed what had for decades been accepted practice: pursuing the most consequential cases.Investigations that require arduous, long-term spadework, like human trafficking prosecutions, took a back seat across the country as agents from Immigration and Customs Enforcement and Homeland Security Investigations were told to shift to immigration cases, said Luis C.deBaca, who served as the State Department’s ambassador for combating human trafficking during the Obama administration.Mr. C.deBaca said such prosecutions take a long time and vary widely year to year, so the slowdown is not reflected in official data. But he said the feeling that they have been deprioritized is palpable among the agents with whom he stays in close contact.The immigration cases that have priority, he added, “are like shooting fish in a barrel, and now people are bringing in new barrels everyday — as opposed to having six or eight agents working all year trying to bring a human trafficking network to justice.”According to TRAC, the biggest decline in drug prosecutions came in the Southern District of California, where they fell by 31 percent in the period from April to September compared with the same six months last year, and in Arizona, where the decline was 37 percent.In San Diego prosecutors were “definitely” diverted to immigration cases, Shereen Charlick, who was a federal public defender in San Diego, said in an interview last month.Ms. Charlick, who has since been named a state judge, said the focus on immigration had de-emphasized pursuit of the smugglers, also called coyotes, who take migrants over the border.“They’re so busy prosecuting people trying to enter that the smugglers are going free,” she said. “Some of the people they’re trying to prosecute are people who would have been material witnesses to the smuggling, but now they are being prosecuted themselves.”A senior prosecutor in the United States attorney’s office in San Diego wrote in May that the office was “diverting staff, both support and attorneys” to handle immigration cases, while drug cases would be brought only if agents completed them within tight deadlines, according to an email obtained by USA Today, which reported on the decline in border drug cases.A spokeswoman for the United States attorney in San Diego, Cindy Cipriani, said the office had not taken “attorney resources” away from other prosecutions, including drug trafficking and the pursuit of “leaders and organizers abroad that are responsible for a vast majority of the illegal immigration along our border.”Ms. Cipriani said the Justice Department and other agencies provided 15 additional lawyers and other staff members to handle border cases. She also suggested it was unfair to cite the drop in drug cases in the time since the zero tolerance policy was announced.“It is misleading to extrapolate trends based on an isolated window of a few months,” she said.While the San Diego office said it prosecuted slightly more drug cases in the fiscal year that ended Sept. 30 compared with a year earlier, officials did not provide a monthly breakdown or say why their numbers differed from data the Justice Department provided TRAC, which showed a 5.4 percent decline over the same period.Amid outcry over children being separated from their families and sent to shelters or foster care, Mr. Trump scaled back zero tolerance this summer.But there were still 10,729 new immigration charges filed in border districts in September — more than twice as many as in September 2017.