WASHINGTON — Almost a year after declaring the opioid epidemic a public health emergency, President Donald Trump on Wednesday signed into law a sweeping legislative package that lawmakers and public health experts believe will help curb the growing crisis in the United States.

"Together we are going to end the scourge of drug addiction,” Trump said at a bill-signing ceremony at the White House. “Or at least make an extremely big dent in this terrible, terrible problem.”

Moments before signing the bill, known as the SUPPORT for Patients and Communities Act, the president called the package the “single largest bill to combat the drug crisis in the history of our country.”

The legislative package directs funding to federal agencies and states so they can make increasing access to addiction treatment a priority, and sets in place interventions to help mitigate the crisis, like preventing overprescription and training law enforcement to intercept shipments, including the deadly and highly addictive drug fentanyl, at U.S. borders.

Wednesday's bill signing marked a yearslong effort by both the legislative and executive branch to respond to the growing opioid crisis, which killed more than 48,000 Americans in 2017, according to the Center for Disease Control and Prevention. Moreover, it will be remembered as a major bipartisan feat at the end of another congressional term that many consider to be the most divisive and bitterly partisan one yet.

Democrats applauded the law Wednesday as a step in the right direction, though many said the legislation did not go far enough to confront the epidemic. Some, like Rep. Frank Pallone of New Jersey, the ranking Democrat on the House Energy and Commerce Committee, warned that Republican threats to undo Medicare and Medicaid would only increase the death rate.

"Despite touting this new law today, President Trump and Congressional Republicans continue to threaten to undermine the health care that Americans rely on for opioid treatment," Pallone said in a statement. "It is disingenuous at best to promise relief to people struggling with opioid addiction while also attempting to cut funding for Medicaid and eliminate protections for people with pre-existing conditions, which include opioid use disorder."

Congress and the White House sat down for the first time to discuss combating the epidemic last October ahead of a number of congressional hearings by the House and the Senate on the subject.

The bipartisan approach on Capitol Hill led to a mostly hands-off but supportive process from the White House, which often tends to intervene in contentious legislative battles like health care, taxes and immigration, according to congressional sources.

One Republican congressional source familiar with the process told NBC News that the administration made a priority of directing funds to discover a nonaddictive painkiller and combating overprescription by giving patients smaller doses of opioids in "blister packs."

"The administration was supportive, gave us very timely technical assistance and helped shape bills that were being negotiated while also giving us plenty of space to negotiate with Democrats," another Republican Congressional aide said.

The widespread reach of the crisis, which has struck red and blue states in equal measure and devastated urban and rural communities alike, united hundreds of lawmakers to hold hearings and propose legislation that would shape the SUPPORT bill. Passing the legislation proved to be good ammunition for lawmakers campaigning for re-election in November, as candidates battled over who could provide more solutions to the crisis.

Trump himself talked up the bill at a recent campaign rally in Lebanon, Ohio, but falsely claimed that the legislation came to fruition with "very little Democratic support."

Under the shadows of Justice Brett Kavanaugh's Supreme Court confirmation hearings in early October, both the House and the Senate passed the compromise bill with overwhelming majorities. Only eight House members and one senator, Mike Lee, R-Utah, voted against the landmark legislation this month.

Earlier Wednesday, Kellyanne Conway, the president's counselor, contradicted the president's comments, telling reporters outside the White House that every Democratic senator, including those eyeing potential 2020 bids, voted for the opioid bill "because this is the crisis next door" for all Americans.

Public health experts have applauded the bill for increasing access to treatment, which they argue is a key step to curbing the epidemic. One of the measures removes an old provision that did not allow those with substance abuse issues to access mental health facilities with more than 16 beds for treatment under Medicaid. The bill also creates a grant program for states to help recovery centers and addiction specialists increase their quality of care.

But some experts, like Keith Humphrey, a Stanford professor who helped both House and Senate staff in crafting the legislation, said Congress did not address deep-rooted issues in the health care system that would truly transform the crisis. He said the opioid law does not come close to the scale of measures passed in less contentious congressional eras aimed at combating HIV/AIDs, for example.

“It's not the time to be leisurely, and saying that we’ll get there eventually is not sufficient as an answer,” Humphrey said of decreasing overdose deaths. “If it takes another year, that’s another 60 or 70,000 people in their graves. That's not good enough.”

Lawmakers and aides see the SUPPORT law as the first step of many to combat the epidemic, which killed more Americans than guns and cars in 2017. The House continues to investigate the role of opioid distributors and plans to release a report on potential misconduct in the coming weeks.

The White House on Wednesday also touted new private sector initiatives from companies like Amazon, which said it has programmed its Alexa voice service to answer questions about opioids and addiction, and insurance giant Blue Cross Blue Shield, which will establish a national toll-free hotline to help Americans locate treatment centers.

Emergent BioSolutions, a biopharmaceutical company, will offer free Narcan nasal spray, which can help reverse an opioid overdose, to over 16,500 public libraries and 2,700 YMCAs.