A newly elected city councilman has been barred from taking office because of a drug conviction from 23 years ago.

McKeesport Councilman-elect Corey Sanders pleaded no contest to two felony drug counts in 1993 and was sentenced to four years in prison. The Democrat was elected to the City Council in November but was prevented from being sworn in with colleagues on Monday night.

Kevin Francis McCarthy, Allegheny County assistant district attorney, said in a letter to McKeesport Mayor Michael Cherepko that Sanders' conviction makes him "constitutionally ineligible to hold public office."

McCarthy's office said Sanders will need a full pardon from Democratic Gov. Tom Wolf to be able to hold public office. Sanders has already hired a lawyer and petitioned the governor for a pardon, according to city Solicitor Jason Elash.

Councilwoman Fawn Walker-Montgomery came to Sanders' defense, saying other members should have been subjected to the same legal technicalities being used on Sanders.

Elash has been convicted on driving-under-the-influence charges but still serves in public office, WTAE-TV reported.

The latest headlines on the 2016 elections from the biggest name in politics. See Latest Coverage →

Community members said Sanders has turned his life around and mentored young men to stay out of trouble.

John Fetterman, mayor of the nearby borough of Braddock, released a statement Tuesday calling on the governor to issue a pardon for Sanders. He said a drug conviction shouldn't "banish one for life from participating in our democracy."

Sanders said he will continue to show up at future meetings. The district attorney's office said it will petition for Sander's removal should he take office as a councilman.