The drug-testing movement began in 1986, when former President Ronald Reagan signed Executive Order 12564, requiring all federal employees to refrain from using illegal drugs, on or off-duty, as a condition of federal employment. Two years later, Congress passed the Drug-Free Workplace Act of 1988. That, in turn, spawned the creation of federal Mandatory Guidelines for Federal Workplace Drug Testing Programs (Section 503 of Public Law 100-71). The mandatory guidelines apply to executive agencies of the federal government, the uniformed services (excepting certain members of the armed forces), and contractors or service providers under contract with the federal government (excepting the postal service and employing units in the judicial and legislative branches).
Although the Act only applies to federal employees, many state and local governments followed suit and adopted similar programs under state laws and drug-free workplace programs.