The House overwhelmingly approved a compromise package bolstering federal steps against illicit drugs on Friday, as lawmakers of both parties flocked to cast an election-year vote to stem the nation's surge of deaths among drug abusers.

The legislation was approved 407-5, underscoring the broad support it has attracted to combat a problem that claims victims across racial, economic and geographic lines.

"Let's come together and get the job done. What we're doing will save lives," said Rep. Fred Upton, R-Mich., chairman of the House Energy and Commerce Committee.

Unlike many bills in this highly partisan Congress, the House-Senate compromise was written by members of both parties, and early versions of the measure were approved overwhelmingly by both chambers.

Democrats initially refused to endorse the final accord that House-Senate bargainers produced this week, complaining that it contained no actual money to finance its programs. But Democrats decided it was better to back the measure and push for more money in future spending bills, and Thursday night's sniper slayings of five Dallas police officers seemed to leave both sides eager to avoid a full-fledged partisan brawl.

After a morning of floor speeches in which members of both parties called for a period of healing, House Minority Leader Nancy Pelosi, D-Calif., said that "in the spirit of this day," Democrats should back the legislation and seek the extra money later.

"This legislation takes only a small step when the American people need us to run," said Rep. Frank Pallone of New Jersey, a lead Democratic author of the measure.

With the House's lopsided vote, Senate Democratic aides said the measure was now on track to win final congressional approval from the Senate and was expected to be signed by President Barack Obama.

More than 47,000 people die yearly from drug overdoses, a death rate that has more than doubled since 2000. Around 6 in 10 of those fatalities were caused by heroin and opioids, potentially addictive medications that are prescribed to kill pain. The government has estimated that more than 2 million Americans have opioid abuse problems, plus nearly 500,000 more who are heroin addicts.

The bill establishes grants for expanding treatment programs, boosting the availability of drugs that reverse overdoses and improving emergency workers' training.

Recovery services for addicts would be expanded, states could get financial incentives for providing a full range of opioid abuse services, and more medical workers would be allowed to prescribe buprenorphine, which can wean people off opioids.