An ex-prosecutor accused of promising a defendant favors in court in exchange for nude images was convicted on three articles of impeachment Thursday, in the Kentucky Senate's first impeachment trial in more than a century.

Senators voted 34-0 to convict former state prosecutor Ronnie Goldy Jr. on each impeachment article. The action will bar Goldy from holding a future elected office in the state.

Goldy had failed to appear at a hearing last week before the Senate impeachment panel.

Goldy had served as commonwealth’s attorney for Bath, Menifee, Montgomery and Rowan counties. He resigned effective Feb. 28 after the impeachment articles were drafted. The House voted 97-0 last month to impeach Goldy.

ARMY BLACK HAWK HELICOPTERS CRASH, KILLING 9 SERVICE MEMBERS: OFFICIAL

Kentucky Fox News graphic

The Kentucky Senate convicted a former prosecutor in an impeachment trial on Thursday.

CLICK HERE TO GET THE FOX NEWS APP

An attorney who represented Goldy did not immediately respond to a phone call seeking comment.

Goldy has been embroiled in scandal since July, when the Courier Journal first reported hundreds of Facebook messages he exchanged with the defendant.

The defendant testified the Facebook messages were authentic and told a hearing officer for a bar inquiry commission that she and Goldy had sexual relations, with the prosecutor allegedly withdrawing warrants and getting her cases continued in exchange for the images, the newspaper reported.

In a written response to an inquiry from the House impeachment committee, Goldy defended himself by arguing that the nude photos and videos the woman sent him were "an extension of the friendship they had developed."