New Jersey doctors will be able to prescribe only five days' worth of opioid painkillers for most patients under a law Gov. Christie signed Wednesday as part of his pledge to fight addiction.

The law also requires insurers to cover 180 days of drug treatment, although inpatient treatment can be reviewed after 28 days.

"Today, we are taking action to save lives," Christie said Wednesday afternoon at a Statehouse news conference, where he signed the bill 15 minutes after it passed the Democratic-led Assembly, and a little more than a month after he promised to spend most of his final year in office tackling addiction.

The law contains exceptions for cancer and hospice patients. The restriction had been 30 days, and the new law has drawn fire from the physicians' lobby. It is "the country's strongest maximum limit," Christie said.

The new law takes effect in 90 days. The Attorney General's Office, which had said it would use emergency rule-making powers to enact the limits, plans to use that power by the end of the month, a spokesman said Wednesday night.

Christie said the law's insurance mandate would prevent people from being denied drug treatment during a "preevaluation that can take weeks to complete."

Now, "people cannot be denied access in a time of need," Christie said.

The governor, who cited statistics about rising overdose deaths in New Jersey, said that the more addiction is treated and regulated as a disease, "the more people will finally get the idea that asking for help is not a sign of weakness."

"This is the only way we are going to change this problem across our state, and hopefully across our nation," Christie said.

The governor, who, along with his wife, Mary Pat, had lunch Tuesday at the White House with President Trump, said that he "spent a good amount of time" talking with Trump about drug abuse and that Trump was interested in New Jersey's legislation.

"I'm sure we are going to have further conversations about the way we can deal with this problem on a much broader level," Christie said. (He said the conversation "did not include any discussion of me joining the Trump administration in some drug-abuse role.")

While some doctors have criticized the five-day limit as overly rigid, Christie said he would reject any change to the law that would allow for seven-day prescriptions — a proposal mentioned by a Republican assemblyman Wednesday. Christie pointed to federal Centers for Disease Control and Prevention guidelines, which say three days or less "will often be sufficient."

"I took the midpoint" between three days and seven, a limit imposed in some other states, Christie said.

Asked about the law's costs, the governor said he didn't know, because the state does not know how many people will receive treatment.

The law will require insurers to cover 180 days of treatment for substance-use disorder per plan year. Outpatient treatment will count as half a plan day, meaning people could be covered for 360 days of treatment "without any interference" from their insurer, according to the governor's office.

The law provides for an appeals process if insurers determine inpatient treatment is no longer necessary after 28 days. In terms of costs to the patient, "at no time will any covered person pay more than their co-payment, deductible, or co-insurance," according to the governor's office.

"Whatever the cost is of this, it's certainly less than 1,600 lives a year," Christie said, referring to the number of overdose deaths in the state in 2015.

The insurance mandate does not apply to the federal Medicare or Medicaid programs, or most large-employer plans, which states cannot regulate.

It will apply to 18 percent of New Jerseyans in commercial markets — including individual, small, and midsize employer plans — and 10 percent in the State Health Benefits Program and the School Employees Health Benefits Program, according to the New Jersey Association of Health Plans.

The association has said the law will carry "a significant cost" to the State Health Benefits Program and "significantly increase premiums for all policy holders who buy insurance in the commercial marketplace."

In the Assembly, where the bill passed, 64-1, Wednesday, Assemblyman Declan O'Scanlon (R., Monmouth) predicted that the mandate would not result in unnecessary treatment costs.

But "we have to accept the costs," he said. He called the bill imperfect — and said he was open to loosening the limit to seven days — but necessary.

O'Scanlon, whose brother died one month earlier of alcohol addiction, said his family had scrounged for money to send his brother repeatedly to treatment.

If they hadn't, "my brother would have been dead two years ago," O'Scanlon said. The two years were hard, but "I wouldn't give them back. They were worth every penny."

Staff writer Andrew Seidman contributed to this article.