Washington (CNN) Officials from the Office of National Drug Control Policy were preparing a briefing for President Donald Trump late last year ahead of his meeting with the Chinese President at the G20 summit when they decided they needed a visual aid to drive home their point.

An aide ran down to the group's office and pulled up a Los Angeles Times article headlined "Fentanyl smuggled from China is killing thousands of Americans." ONDCP Director Jim Carroll handed it to the President minutes later in the Oval Office.

"That's what I want," Trump said, scrawling "you have to help us with this" onto the printed story and telling his staff to send it to Chinese President Xi Jinping, according to a senior White House official familiar with the incident. Days later, Trump pressed Xi on the issue in person, in the opening moments of a steak dinner that capped the Buenos Aires conference.

An agreement won in that meal -- and taking effect this week -- will see China schedule fentanyl and its derivatives as a controlled substance, a victory for the Trump administration that the White House says could initiate an immediate and "fairly rapid decrease" in overdose deaths in the US.

The move, which came as the two countries grappled in an escalating trade war, was the product of months of lobbying by the Trump administration after a turn towards a harder line on the topic in 2017, multiple officials involved in the process told CNN.

Over the next year and a half, negotiators chipped away at Chinese recalcitrance towards policy change to their drug market, and their belief that fentanyl enforcement was only a political whim of Trump's. Senior congressional leaders, and Trump himself, were dispatched to bring it home.

When Trump sat down with Xi in Buenos Aires, the table had been set for the deal.

"This could be a game changer on what is considered to be the worst and most dangerous, addictive and deadly substance of them all," Trump tweeted after winning the concession from Xi.

Fentanyl, an extremely potent synthetic opioid, has been the driver of record overdose deaths in recent years. In 2017, fentanyl and its derivatives were behind close to 30,000 of the 72,000 overdose deaths in the US, according to the National Institute on Drug Abuse.

While it has legitimate use as a painkiller, illicit fentanyl has been used by drug traffickers as an inexpensive additive to other illegal drugs, namely heroin.

Import from China

China is the leading producer of illegal fentanyl, according to drug enforcement officials, and outside the legal pharmaceutical industry, it is readily available for purchase on dark web marketplaces where its shipped to the US and Mexico through the mail.

Since the two countries began cooperating over the drug's enforcement, China has scheduled dozens of fentanyl derivatives as controlled substances, enabling law enforcement there to arrest manufacturers of certain strands outside of the regulatory framework, and creating a measurable downturn in the shipment of those strands to the US, according to DEA statistics.

Fentanyl's chemical compound, however, can be easily manipulated to create endless new analogues outside of the prohibited classes, and the Chinese, who officials involved in the negotiations say challenged the drug's role in the US opioid crisis, were reluctant to address the flow of fentanyl in a systemic way.

The Chinese pharmaceutical landscape is inherently hard to police, and some global drug experts are skeptical that the country's new policy will be successful. Official counts put the number of chemical companies in China at 160,000, with some estimates as high as 400,000. Drug production facilities range from corporate conglomerates to backwoods operations.

At the same time, China is believed to have only about 2,000 drug inspectors, according to Vanda Felbab-Brown, a senior foreign policy fellow at the Brookings Institute.

"There are still too few regulators," Felbab-Brown said. "Now, legally, China is capable of taking action and going after people who illegally sell fentanyl into the United States. That does not necessarily mean that China easily has the capacity to in fact enforce the new law."

Earlier attempts by the US to propose more moderate changes to China's drug scheduling laws were met with handwringing.

"We got varying responses from the Chinese that were, 'the legislation's too hard,' 'it's going to take a long time,' 'we can't do that,' 'it's not right to ask us to do that,' " the senior White House official said.

In the summer of 2017, US drug enforcement officials decided to aim for a loftier goal: full class scheduling of fentanyl and all of its derivatives, a regulatory framework that would institutionalize Chinese fentanyl production and leave any rogue producers subject to arrest.

Later that year, Trump presented the idea to Xi on a visit to China and secured nominal support. That first outreach, according to a State Department official, signaled the seriousness of the US resolve on the issue, and kickstarted a lobbying effort by the US Embassy in Beijing and drug enforcement officials across the administration.

When Terry Branstad, a former governor of Iowa, was installed that year as the ambassador to China, stemming the flow of Chinese fentanyl to the US was one of the top stated priorities of his posting.

Over the next several months, diplomats in China honed their pitch to show the Chinese that full class scheduling would be an opportunity for them to fix a bad reputation they had earned in the US.

"Dating back to the Obama administration, the US argument has been that China has a reputational challenge in the United States, where it more often is associated with problems for American people than solutions. Curbing the flow of fentanyl provides an opportunity for Beijing to show it is helping to solve problems for Americans, rather than be the source of them," said Ryan Hass, a former director for China at the National Security Council.

The US Embassy in Beijing also struggled to convince the Chinese that the fentanyl problem in the US wasn't just a political interest of the Trump administration, but a more widespread US government priority, according to a second State Department official.

That changed in late October 2018, just days before the US midterm elections, when a group of seven congressional leaders on a trade mission arrived in Beijing with a directive from Branstad.

"Before we went, Ambassador Branstad said when you come don't just talk about trade, persuade the Chinese leaders of the importance of them stopping the flow of fentanyl into the United States because they don't believe it's that big a problem," Sen. Lamar Alexander, a Tennessee Republican who lead the delegation, said in an interview.

"Every meeting we had it was the first question we brought up," Alexander said. "They were skeptical and disbelieving and I think a little insulted that I would say that almost all the fentanyl that comes into the United States one way or the other starts in China according to our drug enforcement agency."

After several meetings over the course of the four-day trip, senior officials in China "were convinced that it was important," Alexander said. When he returned to Washington, Alexander phoned Ivanka Trump, the President's daughter and adviser who was helping with her father's preparation for the G20, to brief her on the developments.

Still, after Trump's breakthrough with Xi in Buenos Aires, drug enforcement officials in the White House knew they needed to keep the pressure on the Chinese to convert the promise into action.

"We just know that when the President got that commitment from President Xi that we weren't going to let that go," the senior White House official said. "It now gave everybody who interacted with a Chinese official on this particular issue a specific ask, a specific talking point, and the federal government followed through in making sure that everybody mentioned it in all of their interactions."

Carroll, the ONDCP director, drew up an ultimatum in a meeting with the Chinese ambassador in the period after the December announcement.

Sitting across from Cui Tiankai in a room of the Eisenhower Executive Office Building in DC, Carroll said that he would cancel a planned trip to China if progress hadn't been made on the fentanyl scheduling agreement, the senior White House official said.

The China trip -- on the books for that spring -- was later canceled by the US as the Chinese government went more than three months without announcing any new policy.

In a meeting of a United Nations drug commission in Vienna that March, the top State Department official for international narcotics was also pressing the Chinese for information on their promised change.

Assistant Secretary Kirsten Madison was told only that China was still committed to the shift, and that they would be making the official regulations "soon," the first State Department official said.

Then, on April 1, in the middle of the night, an email arrived.

"It was Sunday night, middle of the night our time. I woke up at 5:15 in the morning and I immediately grab my work phone and I've got an email from US Embassy Beijing. I open it up and there's the announcement," the senior White House official recalled. "We're all there at 5:15 in the morning going, you've got to be kidding me. There's always that first -- is this the real deal?"

At a press conference in Beijing that Monday, China's Ministry of Public Security, National Health Commission and the National Medical Products Administration came together to make the announcement.

Liu Yuejin, deputy head of China's National Narcotics Control Commission, called the move a "major innovative measure" in the country's contribution to the global war on drugs.

While the Chinese still denied Washington's accusation that they are the primary source for fentanyl substances in the US, Liu stressed that China would enforce its laws "even more comprehensively" after the latest announcement and "bring violators to justice without mercy."

Internal administration forecasts predict the announcement will lead to a "fairly rapid decrease" in overdose numbers as well as in the amount of illegal fentanyl seized by authorities at ports of entry into the United states, the senior White House official said, and drug enforcement officials remain optimistic that China will be able to enforce the new policy.

The senior White House official said there have already been "indicators" that the Chinese are taking their next steps seriously.

In a statement to CNN, Carroll praised Trump for a "strong posture and commitment to saving American lives" that enabled the "historic agreement" with China, and pressed the country to follow through on their change.

"In order for us to save American lives, it's critical China follows through on their pledge to schedule all fentanyl-related drugs as a class and crack down on those producing these deadly substances," Carroll said.