WASHINGTON — Hundreds of people nationwide, including dozens of doctors, have been charged in health care fraud prosecutions, accused of collectively defrauding the government of $1.3 billion, the Justice Department said on Thursday.

Nearly one-third of the 412 charged were accused of opioid-related crimes. The health care providers, about 50 of them doctors, billed Medicare and Medicaid for drugs that were never purchased; collected money for false rehabilitation treatments and tests; and gave out prescriptions for cash, according to prosecutors.

Some of the doctors wrote more prescriptions for controlled substances in a single month than entire hospitals wrote in that time, the acting director of the F.B.I., Andrew G. McCabe, said at a news conference in Washington of federal law enforcement and health care officials who announced the prosecutions.

“This event again highlights the enormity of the fraud challenge we face,” Attorney General Jeff Sessions said.