Oyster Bay Town Supervisor John Venditto, who is under indictment on federal corruption charges, said he will resign from a 35-year career in government at the end of the day Wednesday.

“I have decided to leave my position as the Oyster Bay Town supervisor,” Venditto said in a statement on Tuesday. “I now feel that it is in the best interests of the town and its residents for me to do so, especially since it will be difficult, if not impossible, for me to function as the town supervisor going forward, as I focus on clearing my name.”

The announcement ends months of speculation on his future in the town since his indictment in October on federal corruption charges. He is accused of soliciting and accepting bribes from restaurateur and former town concessionaire Harendra Singh in return for helping him obtain town guarantees on $20 million in loans.

Venditto has pleaded not guilty. Singh, who also faces federal charges, is due in U.S. District Court next week for jury selection in his trial.

The resignation ends a career in government that includes being elected to 10 terms as town supervisor. A Republican, Venditto first won election as supervisor in 1997 after serving as town attorney and councilman. As supervisor he maintained a tight control over the board.

That grip began to loosen last year and board members openly dissented against some of his decisions as the Singh controversy broke and former town planning commissioner Frederick Ippolito pleaded guilty to federal tax evasion charges.

Venditto, 67, a resident of North Massapequa, last year began collecting his annual pension of $79,575 and took a reduced salary from the town so that his combined gross yearly pay remained at $140,000.

Venditto’s reputation in Oyster Bay suffered as the town’s once enviable finances deteriorated as debt more than doubled to more than $729 million over the past decade and Standard & Poor’s downgraded Oyster Bay’s credit rating to junk status. The downgrading prompted Venditto to say publically that he had made mistakes in the management of the town.

After years of easy victories, in 2015 he won re-election by fewer than 100 votes when he was challenged by a virtual unknown.

Councilman Joseph Pinto praised Venditto for doing “wonderful things for the town of Oyster Bay for many years,” but said the past year and a half have been difficult for the town.

“Hopefully now the focus will come off what’s going on with the supervisor and go back to what’s important for town residents,” he said.

Democrat Bob Frier, a former town board candidate from Woodbury and a Venditto critic, said, “Taxpayers should demand that whoever they appoint should not be part of this culture of corruption that has existed in the town of Oyster Bay.”