WASHINGTON — The federal government’s three-year prosecution of five former officials of Blackwater Worldwide virtually collapsed on Thursday after charges against three of the officials were dismissed and the other two agreed to plead guilty to reduced misdemeanor charges with no jail time.

Judge Louise W. Flanagan of Federal District Court in North Carolina dismissed all charges against two of the officials, Andrew Howell, Blackwater’s former general counsel, and Ana Bundy, a former vice president; prosecutors agreed to drop charges against a third, Ronald Slezak, a former weapons manager. The two other officials, Gary Jackson, a former president of Blackwater, and William Matthews, a former executive vice president, agreed to plead guilty to a misdemeanor charge related to records keeping. They will each receive three years of probation and four months of home confinement, and pay fines of $5,000.

In 2010, the Justice Department charged the five officials with weapons violations and making false statements. The case was just one of several criminal prosecutions, civil lawsuits and Congressional investigations in recent years involving a company that earned billions of dollars in government contracts after the Sept. 11, 2001, attacks and became indispensable to the Pentagon, the State Department and the Central Intelligence Agency. But it is the only case that led to criminal charges against top former executives of the company.

The charges stemmed from a raid in 2008 by the Bureau of Alcohol, Tobacco and Firearms of Blackwater’s sprawling headquarters complex in Moyock, N.C. Agents seized 22 weapons, including 17 AK-47s. The former employees were charged with trying to hide the company’s purchases of the weapons by making it appear that a North Carolina sheriff’s office had bought them. In addition, federal prosecutors charged that Blackwater tried to avoid export regulations in illegally shipping a cache of short-barrel rifles overseas.