Opioid treatment agreements (OTAs) are documents that clinicians present to patients when prescribing opioids that describe the risks of opioids and specify requirements that patients must meet to receive their medication. Notwithstanding a lack of evidence that OTAs effectively mitigate opioids' risks, professional organizations recommend that they be implemented, and jurisdictions increasingly require them. We sought to identify the jurisdictions that require OTAs, how OTAs might affect the outcomes of lawsuits that arise when things go wrong, and instances in which the law permits flexibility for clinicians and health care institutions to adopt best practices. We surveyed the laws and regulations of all 50 states and the District of Columbia to identify which jurisdictions require the use of OTAs, the circumstances in which OTA use is mandatory, and the terms OTAs must include (if any). We also surveyed criminal and civil judicial decisions in which OTAs were discussed as evidence on which a court relied to make its decision to determine how OTA use influences litigation outcomes. Results show that a slight majority (27) of jurisdictions now require OTAs. With one exception, the jurisdictions' requirements for OTA use are triggered at least in part by long-term prescribing. There is otherwise substantial variation and flexibility within OTA requirements. Results also show that even in jurisdictions where OTA use is not required by statute or regulation, OTA use can inform courts' reasoning in lawsuits involving patients or clinicians. Sometimes, but not always, OTA use legally protects clinicians from liability. Our results show that OTA use is entwined with legal obligations in various ways. Clinicians and health care institutions should identify ways for OTAs to enhance clinician-patient relationships and patient care within the bounds of relevant legal requirements and risks.