Titus Z. Taggart, an 18-year veteran of the State Police who was fired last summer after an internal investigation into allegations he was involved with off-duty parties with prostitutes, was sentenced in Erie County Court Wednesday to three years’ probation.

Judge Kenneth F. Case also ordered Taggart to perform 300 hours of community service.

Taggart, 42, of Buffalo, had faced up to a year in jail and a $1,000 fine after admitting to a misdemeanor count of promoting prostitution.

Case rebuked Taggart for dishonoring the State Police uniform but decided against jailing him, given the financial losses the ex-trooper has suffered with the loss of his job. The judge also cited many letters he has received on Taggart’s behalf. A State Police investigation revealed that Taggart organized, advertised and supervised exotic dance parties involving dancers and prostitutes.

The Erie County District Attorney’s Office agreed to the plea because Taggart’s police career is over, and he has suffered severe financial consequences as a result of his firing, prosecutor Paul E. Bonanno said in December when Taggart pleaded guilty.

Taggart, a resident of the Bailey-Kensington neighborhood, apologized to his family, friends and the State Police at the sentencing. He also thanked his church community, Mount Zion Church of God Holiness, for its support.

“He spoke from the heart,” said his lawyer, Michael G. O’Rourke.

Currently unemployed, Taggart is suffering from a medical condition that evolved from a kidney transplant 14 years ago, according to O’Rourke.

“He is on a number of medications, and it makes for a difficult situation,” the attorney said.

He is the son of Arthur L. Taggart, a well-respected colonel in the State Police who is now retired.

The older Taggart and his wife were present in court for the sentencing.

“His father was absolutely supportive and 100 percent behind Titus throughout this whole ordeal,” O’Rourke said.

Taggart hopes to work with young people in the Buffalo community to fulfill the community service portion of his sentence.

“His hope is that they could benefit in a positive way from all his life experiences,” O’Rourke said. The attorney pointed out that, except for what undid his client’s career, he was never in any type of trouble.

“For 18 years, he had an unblemished record. After the kidney transplant, he could have gone out on a medical retirement but fought his way back, and really it was a courageous rehabilitation to get back on the job,” O’Rourke said.

The attorney said he was unable to offer any explanation why Taggart engaged in the deeds that ended his law enforcement career.

O’Rourke said: “It was so out of character.”