The federal government has lagged the states in its response to the opioid epidemic. Many have already set out rules for doctors to follow, as have some professional medical societies. So proponents of national guidelines applauded their release, which they said was overdue.

“This is the first time the federal government is communicating clearly to the medical community that long-term use for common conditions is inappropriate,” said Dr. Andrew Kolodny, the head of Physicians for Responsible Opioid Prescribing. “It’s one of the most significant interventions by the federal government.”

Although the federal guidelines are nonbinding, they are important because they are now the broadest blueprint in place addressing opioids use. Some observers said doctors, fearing lawsuits, would reflexively follow them, and insurance companies could begin to use them to determine reimbursement.

“These will not be seen as voluntary,” said Myra Christopher, the director of the Pain Action Alliance to Implement a National Strategy, a coalition of medical and patient advocacy groups focused on chronic pain care that had opposed the guidelines. “These will become the definition of the standard of care, because of the clout of the Centers for Disease Control.”

The guidelines recommend what many addiction experts have long called for: that doctors first try ibuprofen and aspirin to treat pain, and that opioid treatment for short-term pain last for three days, and rarely longer than seven. That is far less than current practice, in which patients are often given two weeks’ or a month’s worth of pills.

The recommendations are meant for primary care doctors, who prescribe about half of all opioids but often have little training in how to use them. They call for patients to be urine tested before getting prescriptions and for doctors to check prescription tracking systems to make sure patients are not secretly getting medicine somewhere else. They do not apply to prescriptions for patients receiving cancer or end-of-life treatment, or to patients who have had surgery.