Reality Winner, the former Air Force linguist and intelligence contractor who pleaded guilty in June to leaking a top-secret government report on Russian hacking, was sentenced on Thursday to five years and three months in federal prison.

Ms. Winner, 26, is the first person to be sentenced under the Espionage Act since President Trump took office. Prosecutors said her sentence was the longest ever imposed in federal court for an unauthorized release of government information to the media.

She was arrested in June 2017 and was held for more than a year while prosecutors built a case. She pleaded guilty in June 2018 to one felony count of unauthorized transmission of national defense information, for giving a classified report about Russian interference in the 2016 election to a news outlet.

Prosecutors said on Thursday that Ms. Winner’s actions merited a stiff sentence.

“Winner’s purposeful violation put our nation’s security at risk,” United States Attorney Bobby L. Christine told reporters after the sentencing in federal court in Augusta, Ga. He said the report she leaked revealed sources and methods of intelligence gathering, and its disclosure “caused exceptionally grave damage to U.S. national security.”