A federal judge sentenced a former senior U.S. Treasury Department official to six months in federal prison for leaking a trove of sensitive financial information about Paul Manafort and others, capping a case that emerged from a Trump administration crackdown on government leaks to journalists.

Natalie Mayflower Sours Edwards, who served as a senior adviser in the Treasury’s Financial Crimes Enforcement Network, or FinCEN, pleaded guilty last year to one count of conspiracy to make unauthorized disclosure of “suspicious activity reports,” known as SARs, which banks are required to file to FinCEN.

Manhattan federal prosecutors said Ms. Edwards sent tens of thousands of Treasury records—including bank-activity reports and sensitive analysis about former Trump campaign officials, as well as Russian diplomatic accounts and terrorist group financing—to a reporter at BuzzFeed News.

The materials resulted in at least a dozen articles about Mr. Manafort and others, prosecutors said, and formed the basis of BuzzFeed News’ “FinCEN Files”—a database published by BuzzFeed News and the International Consortium of Investigative Journalists last September, months after Ms. Edwards’s guilty plea,

“She abused a position of trust,” said U.S. District Judge Gregory H. Woods, adding that Ms. Edwards “may have made our country less safe.” The judge also imposed a three-year term of supervised release.

A lawyer for Ms. Edwards couldn’t immediately be reached for comment.

In a statement, a BuzzFeed News spokesman condemned the sentence and described Ms. Edwards as a “brave whistleblower.” The statement publicly credited her, for the first time, with the materials that BuzzFeed published. “She fought to warn the public about grave risks to America’s national security, first through the official whistleblower process, and then through the press,” the statement said. “She did so, despite tremendous personal risk, because she believed she owed it to the country she loves.”

Ms. Edwards’s claims that she was acting as a whistleblower figured prominently in Thursday’s sentencing hearing. Her lawyers had sought a sentence without prison time, citing her career in public service and saying she reached out to a reporter after she believed she was being retaliated against for blowing the whistle on “what she believed to be improper conduct at the Treasury Department.”

In a statement to the court Thursday, Ms. Edwards described repeated attempts to flag her concerns to various government bodies.

“When I physically saw corruption in the Treasury Department, I could not stand by aimlessly,” she said. “I never concealed the fact that I went to the media,” she said, adding that she was sorry that “a lot of information” was ultimately made public.

Assistant U.S. Attorney Kimberly Ravener disputed those claims in court, noting that Ms. Edwards had taken pains to avoid detection of her leak. “To this day, she seeks to hide behind irrelevant, self-righteous claims,” Ms. Ravener said.

The government had sought a six-month sentence, at the upper end of federal sentencing guidelines, calling her acts “a betrayal of the public.”

Judge Woods drew a distinction between her whistleblower claims made through appropriate channels, which he called a “valuable exercise,” and her later leaks to the reporter.

“At some point, Ms. Edwards decided to abuse her position of trust and provide thousands of SARs illegally to somebody who was not supposed to have them,” the judge said.

Ms. Edwards was arrested in October 2018 and charged with one count of conspiracy and one count of disclosing the SARs.

The Wall Street Journal reported that Ms. Edwards was a supporter of former President Donald Trump, and that she and other colleagues believed another Treasury unit was mishandling sensitive information.

Write to Rebecca Davis O’Brien at Rebecca.OBrien@wsj.com