James A. Wolfe, former security director for the Senate Intelligence Committee, leaves the federal courthouse in Baltimore after a hearing Friday. (Patrick Semansky/AP)

The Justice Department took a significant step this week toward advancing its long-promised crackdown on leaks, charging a former Senate Intelligence Committee staffer with lying to the FBI about his contacts with reporters, and seizing the phone and email records of a journalist to help make its case.

As the man charged in the brewing controversy made his first court appearance, free-press advocates warned that federal prosecutors’ heavy-handed tactics might send a further chill through the government, where officials already are reluctant to share information.

To support the charges against James A. Wolfe, prosecutors obtained years of phone records from New York Times reporter Ali Watkins, who had been in a romantic relationship with Wolfe and previously covered the congressional committee where he worked as security director.

“Seizing a journalist’s records sends a terrible message to the public and should never be considered except as the last resort in a truly essential investigation,” said Bruce Brown, executive director of the Reporters Committee for Freedom of the Press. “We call on the Justice Department to explain how its actions adhered to its own guidelines for protecting newsgathering from exactly these kinds of damaging intrusions.”

A person close to the Intelligence Committee said investigators had obtained so much material from Wolfe’s devices, they would not have needed to seize Watkins’s records to bring charges.

Wolfe, 57, appeared for the first time in U.S. District Court in Baltimore on Friday afternoon, wearing a white shirt and dark suit. He said little, except to answer yes or no questions from the judge, who informed him of his rights and released him from custody under certain conditions.

Wolfe is scheduled to appear in court in Washington on Tuesday afternoon. He appeared first in Maryland because he was arrested in that state.

The charges against Wolfe signal the downfall of a longtime Senate staffer who was trusted to handle some of the government’s most sensitive information. But they are perhaps more significant for what they say about the government’s increasingly aggressive campaign — spanning Democratic and Republican administrations — to stop leaks.

Prosecutors in the Obama era brought nine leak cases, more than during all previous administrations combined. They called a reporter a criminal “co-conspirator” and secretly went after journalists’ phone records in a bid to identify reporters’ sources. Prosecutors also sought to compel a reporter to testify and identify a source, though they ultimately backed down from that effort.

Facing heavy criticism, then-Attorney General Eric H. Holder Jr. issued updates in 2015 to the department’s policy on obtaining information from members of the media. Attorney General Jeff Sessions has taken a more aggressive posture.

In August, he revealed that the department had more than tripled the number of leak investigations compared with the number ongoing at the end of the last administration. President Trump has complained vigorously about leaks, particularly those that paint him in an unflattering light.

“This was a mistake when it happened under the Obama administration, as the officials involved ultimately admitted,” Brian Fallon, Holder’s former spokesman, wrote on Twitter of Watkins’s records being seized. “It is a sad day to see those mistakes repeated now.”

Sarah Isgur Flores, the current Justice Department spokeswoman, insisted that the department followed the appropriate steps on obtaining information on members of the media, but she declined to offer details.

The guidelines say that a reporter “shall be given reasonable and timely notice of the Attorney General’s determination before the use of the subpoena,” unless the attorney general determines that notice could pose a clear threat to the investigation or to national security. They also say that prosecutors should seek reporters’ records only “after all reasonable alternative attempts have been made to obtain the information from alternative sources.”

The Times reported that it was “not clear whether investigators exhausted all of their avenues of information before confiscating Ms. Watkins’s information,” and that she was “not notified before they gained access to her information from the telecommunications companies.”

The Times reported that FBI agents initially approached Watkins about her relationship with Wolfe and said they were investigating unauthorized leaks. Federal prosecutors sent her and her lawyer a letter on Feb. 13 indicating that years worth of her phone and email records had been collected — though no actual content was seized.

Wolfe is not charged with disclosing classified information, though prosecutors said investigators first talked to him as they were exploring “multiple unauthorized disclosures of classified information to one or more members of the news media.” In those talks, prosecutors said, Wolfe lied about his contacts with several reporters, including Watkins, and about having provided “nonpublic information related to the matters occurring before the” Senate Intelligence Committee.

FBI agents informed Wolfe of the investigation in late October and interviewed him in December, according to the indictment. In that conversation, according to the indictment, agents showed Wolfe a news story containing classified information and asked him if he had any contact with its three authors. Wolfe claimed he had not, according to the indictment, and also claimed not to have a personal relationship with a reporter.

Both statements would prove problematic. According to the indictment, Wolfe and one of the reporters who wrote the news story had communicated at least five times using his Senate Intelligence Committee email account between December 2015 and June 2017. That reporter was not named in the indictment.

Wolfe also had contacts with other reporters, including a years-long romantic relationship with Watkins, according to the indictment.

Watkins did not return a message seeking comment, and her lawyer, Mark J. MacDougall, declined to comment. Watkins told the Times that Wolfe was “not a source of classified information” for her during their relationship.

Before joining the Times, Watkins worked at Politico and BuzzFeed covering national security issues, and much of her coverage involved the Senate Intelligence Committee. In their conversations with Wolfe, prosecutors seemed to be keenly interested in an April 3, 2017, story she wrote at BuzzFeed, identifying former Trump campaign adviser Carter Page as having met with and passed documents to a Russian intelligence operative in New York in 2013.

Prosecutors said that from mid-2014 to December 2017, Wolfe and Watkins exchanged “tens of thousands” of communications. They said on the day the Senate Intelligence Committee got information about Page, the two exchanged 82 texts and had a 28-minute phone call.

Many of the details in that story already had been public in court documents, though Watkins identified Page, whose name was shielded in the records.

BuzzFeed editor Ben Smith said: “I’m not going to comment at all on a reporter’s sources in the middle of an unjustifiable leak hunt. I am baffled that the FBI and Justice Department are going to these dangerous lengths over a story that points to public court documents that describe Russian spies approaching a Trump adviser, who himself is quoted confirming his role in the episode. I’d like to know why that should be secret.”

According to the indictment, Wolfe ultimately admitted to his relationship with Watkins after being shown pictures of them together, but he insisted he had not given her classified information or “news leads, intelligence, or information about nonpublic” Senate Intelligence Committee matters.

Prosecutors said in the indictment that as recently as December, before he was interviewed, Wolfe messaged Watkins to say: “I always tried to give you as much information that I could and to do the right thing with it so you could get that scoop before anyone else. . . . I always enjoyed the way that you would pursue a story, like nobody else was doing in my hallway. I felt like I was part of your excitement and was always very supportive of your career and the tenacity that you exhibited to chase down a good story.”

A former Republican congressional official worried that the president would seize on the relationship between Watkins and Wolfe to feed his own narrative that the press and veteran Washington officials are conspiring against him.

“If Trump wants to destroy the ‘deep state’ that’s been leaking on him, Jim just did that effort a huge favor,” the former official said.

People who know and have worked with Wolfe said they were shocked by the allegations against him. One former U.S. official described him as the Intelligence Committee’s version of “Mr. Carson,” referring to the butler on the British drama “Downton Abbey” who keeps the manor house running with quiet precision.

“He’s efficient. He’s professional,” the former official said.

Wolfe had announced his retirement to friends and colleagues in December but remained with the committee until last month. He started working for the committee in 1987.

Wolfe also served four years in the Army as an intelligence analyst, according to his LinkedIn profile.

Wolfe was previously involved with an episode regarding the mishandling of sensitive information, but as an investigator.

In 1994, he made an assessment of White House procedures for handling classified information on behalf of then-Sen. Dennis DeConcini (D-Ariz.). Wolfe’s review cited the need to “prevent a breach of security” among White House staffers, which proved to be a prescient observation after a scandal erupted over the White House personnel security director, who improperly got access to hundreds of confidential FBI files on prominent Republicans. The incident was dubbed “Filegate.”

In 1996, while explaining to a Senate committee his qualifications to lead the security review, Wolfe described his responsibilities at the committee as “the day-to-day operations regarding the secure handling, tracking, and storage, of some of the most highly classified information that is provided to the Congress.”

On Friday, Wolfe left the federal courthouse in Maryland shortly before 4 p.m. He marched out silently with his lawyers as a scrum of reporters and cameras circled them and shouted questions. Wolfe and his lawyers did not comment.