BALTIMORE — A veteran cybersecurity specialist for the National Security Agency and other intelligence organizations, accused of taking thousands of secret documents home over two decades, has decided to plead guilty later this month to a single charge that could carry a 10-year sentence.

But under the terms laid out by prosecutors, the intelligence contractor, Harold T. Martin III, would have no guarantee that the government will drop 19 additional felony charges. Mr. Martin appears to be making an unusual gamble that his penitence and cooperation will eventually persuade prosecutors to dismiss the rest of the indictment.

According to court filings on Wednesday, Mr. Martin is expected to plead guilty on Jan. 22 before Judge Marvin J. Garbis of United States District Court to one count of willful retention of national defense information in connection with his taking home a single classified N.S.A. document. But charges involving 12 other N.S.A. documents, five from the military’s Cyber Command, and one each from the C.I.A. and the National Reconnaissance Office, would remain in place.

A detailed letter filed by prosecutors in federal court marks a step toward resolution of a highly embarrassing case that exposed gaping holes in the government’s system for safeguarding secrets.