Editor's note: This story has been corrected to reflect that Martan faces up to 24 months in prison, followed by supervised release of up to nine years.

A Tucson man who called in a series of death threats to U.S. Rep. Martha McSally has agreed to plead guilty and is facing up to 24 months in prison.

Steve Martan, 58, acknowledged in court that he left the threatening phone messages for the Republican congresswoman in early May.

Through the pending plea agreement, Martan could be sentenced up to two years in prison followed by nine years of supervised release. That period of supervised release could be reduced by half, to 54 months.

Martan has also agreed to meet with McSally, R-Arizona, before he is formally sentenced.

Martan must undergo a mental health examination and perform 40 hours of community service as part of the agreement.

Court records indicate Martan made three phone calls on May 2 and May 10 to McSally's congressional office to vent frustrations with how McSally was voting.

The office's voicemail system recorded the phone number from the calls and that number was traced back to Martan.

Martan told authorities "he was venting frustrations with Congresswoman McSally's congressional votes in support of the President of the United States," according to the original complaint filed in May.