Mexican police escorted drug figure Edgar “La Barbie” Valdez soon after his arrest in 2010. Valdez is wanted in the United States. (Henry Romero/Reuters)

Before Mexican President Enrique Peña Nieto was elected, U.S. officials were deeply embedded in Mexico’s war against the drug cartels, spending millions to gather intelligence, choose targets and lock away traffickers in American prisons.

But when the new president took over, diplomats lost access to Mexican ministries, working groups stopped meeting and U.S.-funded training programs were put on hold.

“There was a huge pause,” as one American official put it.

Now, as President Obama arrives in Mexico on Wednesday for talks 14 months into Peña Nieto’s tenure, the law enforcement and security partnership between the two countries has revived somewhat, although officials on both sides say the Americans are still kept more at arms’ length than before.

Much of the security relationship takes place behind closed doors. But there are visible signs that the partnership has changed. Mexico, for example, has been sending fewer criminals back to the United States for prosecution and delaying decisions about new State Department-funded programs aimed at training and equipping Mexican law enforcement.

“There was a lot of despair,” said the official, who like some of the American officials interviewed for this article spoke on the condition of anonymity to talk candidly. “If this is the new reality, then we have a problem.”

Each year, the U.S. government asks Mexico to send back dozens of people — murderers, rapists, drug traffickers — to be prosecuted for their crimes in the United States. Under the previous Mexican president, Felipe Calderón, the number of extraditions to the United States sometimes topped 100 per year, more than to any other country.

In 2013, the first full year of Peña Nieto’s government, that number fell to 54, down from 115 the year before. The number of formal extradition requests by the United States had stayed roughly the same across Mexican administrations. Some U.S. officials worried they were losing access to criminals who could provide important intelligence on the workings of drug cartels.

Mexican officials discounted these concerns. Part of this decline in extraditions, said Mariana Benítez, a deputy attorney general in Mexico, is because laws have changed, adding days to the process.

Peña Nieto’s government also changed its policy so that more Mexican criminals would serve their sentences in Mexico before being sent to face American courts. Benítez said that Mexico has agreed to send 22 people to the United States but that those extraditions have been postponed because they are facing legal action in Mexico.

The difference, she said, “is just a matter of time.”

Justice Department spokesman Peter Carr said in a statement that Mexico and the United States have “long enjoyed a robust and collaborative law enforcement partnership.” The smaller extradition figure last year “does not reflect any lessening of the joint commitment of the U.S. and Mexico.”

“The important test is whether both countries are working to secure extraditions in key cases, and that has not changed.”

To Mexican Attorney General Jesús Murillo Karam, the new reality is an improvement for both countries. Before, he said, American law enforcement officers had broad access within the federal prosecutor’s office. Files went missing. Leaked intelligence allowed criminals to get off, “creating more impunity.”

“I am sorry, but I think that was chaos,” Murillo said in an interview. “They may feel that information is closed, but this is not just about the exchange of information, but also fundamentally to avoid the infiltrations that were affecting the prosecution of some crimes.”

Murillo said coordination between the United States and Mexico continues on law enforcement issues but at a higher level than before.

Benítez later added that Mexico was not accusing the United States of mishandling information but that communication was sometimes confused.

The shift in approach exemplifies a governing style many associate with Peña Nieto’s Institutional Revolutionary Party, which governed Mexico for seven decades before returning to power after a 12-year hiatus with his election. One of the most substantive changes is that the Mexican government has tried to funnel American officials through one “window” — the country’s Interior Ministry — rather than give lower-level diplomats and law enforcement officers unfettered access to their Mexican counterparts. Peña Nieto’s administration felt the Americans had burrowed too deeply into its bureaucracy and wanted to regain some control.

The bureaucratic turnover in Mexico during a presidential election is greater than in the United States, so part of the delay was because of new government officials learning their jobs and programs. But there was also suspicion over how closely Calderón worked with the Americans.

The first year of Peña Nieto’s government was also a slow one for the U.S. partnership known as the Merida Initiative, a $2.15 billion aid program started in late 2008 to fight the drug war. In the early years of the program, the focus was on military hardware to bust drug traffickers. The focus has since shifted more toward training police and prosecutors and programs to prevent violence.

When Peña Nieto’s government came in, no new Merida-funded programs were allowed, and some of the U.S. Embassy’s work on human trafficking, money laundering and the training of law enforcement officers was disrupted. The programs came to a “screeching halt,” said one U.S. official. The attitude was “cease and desist dealing with the gringos until we take a look at what’s going on.”

For half a year, the Mexican government talked internally about what each ministry might want from the Americans before making proposals to the embassy. It wasn’t until November that any new projects were approved.

“I would not characterize it as a lost year,” a U.S. official in Washington said. “I would characterize it as a year when the sovereign government wanted to take their own stock of what was being done, what was working, what wasn’t working, and have regular conversations about how to program that money.”