By BRENT KENDALL

A former National Security Agency official accused of mishandling classified information reached a last-minute plea deal with the Justice Department, abruptly ending a high-profile case in the Obama administration’s pursuit of government leaks to the press.

In court documents filed Thursday evening, Thomas A. Drake, a former senior official in the NSA’s electronic eavesdropping division, agreed to plead guilty to a criminal charge of exceeding his authorized use of a computer.

The misdemeanor charge is far less serious than the 10 felony counts Mr. Drake faced in an indictment filed last year. In a sign of how far the government retreated, the Justice Department said in the plea agreement that it wouldn’t object if Mr. Drake faced no jail time. Mr. Drake is expected to appear in court Friday.

“It’s a pale shadow of the original indictment,” said Steven Aftergood of the Federation of American Scientists, who works on government secrecy issues and has been following the Drake case. “The defendant was facing decades in prison, and all of the sudden the government says never mind. It’s a pretty big reversal of course.”

A Justice Department spokeswoman declined to comment. Jury selection in the case was scheduled to begin next week.

The government’s case suffered a setback earlier this week when prosecutors indicated they wouldn’t introduce some government exhibits at trial in order to safeguard information about NSA technology.

Prosecutors had alleged Mr. Drake leaked classified information to a Baltimore Sun reporter.

He was indicted in April 2010 under the little-used Espionage Act, a law that punishes the gathering, disclosure, or retention of national-defense information that could harm the U.S.

According to court papers, the NSA suspended Mr. Drake’s security clearance in November 2007 and he resigned from the agency in April 2008 in lieu of being fired.

Mr. Drake’s lead defense lawyer, public defender James Wyda, didn’t respond to requests for comment on Thursday. Jesselyn Radack, a director at the Government Accountability Project and an attorney who has been advising Mr. Drake, said the government’s case “was largely built on sand. Once it was put to the test, it started collapsing under the weight of the truth.”

Prosecutions against government leakers have been rare, but the Obama administration has brought five such cases, each alleging the defendant threatened national security by mishandling or disclosing classified materials. Mr. Drake’s case was to be the first trial in the Obama administration’s stepped-up efforts.

Prosecutors didn’t actually charge Mr. Drake with leaking information to the press. Prosecutors charged Mr. Drake with illegally retaining classified documents at home, making false statements to federal agents and obstructing an FBI investigation into national-security leaks to the media. Mr. Drake had publicly admitted to passing information to the reporter, Siobhan Gorman, but insisted none of it was classified.

Ms. Gorman wrote several articles for the Sun in 2006 and 2007 that said management failures and expensive-but-ineffective programs at the NSA were undermining the agency’s efforts to gather and analyze electronic intelligence. She now covers intelligence for The Wall Street Journal.

A spokeswoman for the Baltimore Sun declined to comment on the case. A spokeswoman for Dow Jones & Co., publisher of the Journal, declined to comment.