James Wolfe, a former Senate Intelligence Committee staffer, admitted Monday that he lied to FBI agents about his contacts with journalists as part of a plea bargain with prosecutors.

Wolfe, 57, was indicted in June on three counts of making false statements in December about contacts with reporters. He had originally pleaded not guilty to the charges during a court appearance in June, but pleaded guilty to one count on Monday during what was scheduled to be a routine status hearing.

Court papers unsealed in June showed that federal investigators were focusing on Wolfe as the source of an April 2017 article written by New York Times correspondent Ali Watkins, who had also worked BuzzFeed, Huffington Post, Politico and McClatchy.

Wolfe, who is married to a former senior FBI official, had an affair with Watkins, who is more than 32 years his junior, for three years, but has insisted he did not pass classified information to her.

Watkins, 26, was not named in the indictment but details made her identifiable. She was later reassigned to work in New York on a new beat with the New York Times.

“Did you make a false statement to the FBI?” U.S. District Court Judge Ketanji Jackson asked Wolfe in federal court in Washington on Monday. Wolfe responded: "I did, your honor."

Wolfe, who was the longtime director of security for the Senate committee, retired earlier this year after the investigation began.

Sentencing has been set for December 20, and sentencing guidelines indicate he could face up to six months in prison.

According to the Justice Department, the other two charges for making false statements will be dismissed as part of the plea deal — avoiding what could have become a dramatic back-and-forth over freedom of the press and journalist's rights.

The Justice Department said that the guilty plea means that Wolfe is admitting to making false statements to the FBI “concerning whether he had provided unclassified, but not otherwise publicly-available, information to reporters.”

The investigation into Wolfe originally began in April 2017.

"Jim has accepted responsibility for his actions and has chosen to resolve this matter now so that he and his family can move forward with their lives," a statement from Wolfe’s attorneys on Monday read. "We will have much more to say about the facts and Jim's distinguished record of nearly three decades of dedicated service to the Senate and the intelligence community at his sentencing hearing."

At the time of Wolfe’s arrest, President Trump applauded the catching of a “leaker.”

Both the president and Attorney General Jeff Sessions have said they wanted to crack down on the sharing of sensitive and classified information to journalists.

Wolfe’s attorneys emphasized Monday that he “was never charged with having compromised classified information."