MONTPELIER — A bill aimed at curbing heroin and opiate abuse by diverting low-level offenders to treatment programs rather than jail is on track to become law after House and Senate negotiators reached accord Thursday afternoon.

The legislation will provide new tools to courts and prosecutors to assess the risks and needs of defendants. It calls for county prosecutors to offer both pretrial screening and treatment programs to suspects before they are arraigned, when they are considered most likely to be willing to address their addiction.

Additional risk assessment tools are intended to help judges and prosecutors gather more information about each defendant when trying to determine if bail is warranted.

The Senate Judiciary Committee began working on the bill in January immediately after Gov. Peter Shumlin used nearly his entire State of the State address to highlight what he called a growing opiate and heroin problem. The governor declared a “full-blown heroin crisis” in Vermont, prompting national headlines and conversation about heroin use in Vermont and across the country.

The House and Senate passed slightly different versions of the bill, leading to the negotiations this week. The Senate included tough new crimes and penalites for drug trafficking — lowering the threshold for heroin possession to classify as trafficking — and burglary of an occupied dwelling, which the House removed.

The House, meanwhile, passed its version with a later implementation date, which senators said was too slow when the state faces a heroin crisis.

Those differences were resolved Thursday. The House accepted language that creates longer prison terms for people caught bringing heroin into the state to sell. They did raise to 1 gram the amount of heroin that qualifies for the enhanced crime, however.

“We’re really wanting to send a strong message that trafficking drugs into the state is a serious, serious issue,” House Judiciary Committee Chairman William Lippert told his colleagues in the House.

The Senate, meanwhile, will accept an implementation date of October 2015, rather than April, as it passed in its version. The House had been looking to put it off until Jan. 1, 2016.

The Senate accepted the compromise launch date after Robert Sand, senior policy and legal adviser for the Vermont Department of Public Safety, told negotiators the extra months would lead to a better outcome with comparable services in each county.

“Some of those counties are better positioned right now to get going because those relationships exist. If you build in more time no county will have an excuse to say, ‘We’re not ready yet,’” Sand said. “I do think if you are looking at uniform rollout in all 14 counties, having the time for those relations to develop will help.”

Senate Judiciary Committee Chairman Dick Sears, D-Bennington, said the Senate wants to ensure that similar services are available statewide. “By giving them a little extra time to roll it out we can ensure that every county will have similar types of services,” he said.

Lippert, a Democrat from Hinesburg, said the legislation — “a very significant criminal justice initiative” — has been in the works for several years. He said Shumlin “deserves tremendous credit” for acknowledging the heroin scourge in Vermont and elsewhere as a public health issue.

“The idea that we’re going to be able to add substantial needs assessment and screening pre-charge and pre-trial offers the opportunity to move people into treatment and taking them out of the cycle of repeat criminal offenses,” Lippert said. “There’s no guarantee, of course, but I think the courts are going to welcome this information and use it to good effect.”