A Montana man who pleaded guilty to leaving voicemail messages threatening to kill Democratic U.S. Sen. Jon Tester and his family was sentenced Wednesday to 2 1/2 years in prison, the U.S. Attorney's Office said.

Anthony James Cross, 30, of Billings pleaded guilty in January to making threats to injure and murder a U.S. senator.

MILLIONS OF DOLLARS POUR INTO CRUCIAL SENATE RACE AS DEMS TRY TO DERAIL GOP CAMPAIGN: 'RELENTLESS ASSAULT'

U.S. District Court Judge Susan Watters accepted a plea agreement that called for dismissing a charge that Cross made threats against President Joe Biden.

Sen. Jon Tester

WASHINGTON, DC - SEPTEMBER 12: Sen. Jon Tester (D-MT) questions U.S. Securities and Exchange Commission chairman Gary Gensler during a Senate Banking Committee hearing on Capitol Hill September 12, 2023 in Washington, DC. (Drew Angerer)

Tester's office did not immediately respond to an emailed request seeking comment. His office has declined to comment for previous stories about the case.

Threats against public officials in the U.S. have been steadily climbing in recent years, including against members of Congress and their spouses, election workers and local elected officials.

CLICK HERE TO GET THE FOX NEWS APP

Another Montana man, Kevin Patrick Smith of Kalispell, was sentenced to 2 1/2 years in prison in August 2023 for threatening to kill Tester in voicemails left at the senator's office in Kalispell.