Outgoing city Manager Joe Pennachetti made a farewell speech to council on Wednesday, thanking the mayors he served under and providing a glimpse into the challenges he faced under Mayor Rob Ford.

Pennachetti has worked for the city for more than a decade, serving as its chief financial officer and deputy city manager. He became the city manager in 2008.

Joe Pennachetti

Outgoing city manager Joe Pennachetti made a farewell speech to Toronto City Council on Wednesday. (CBC)

His retirement will take effect at the end of November.

Through his 13-year career, Pennachetti served under three mayors, all of whom he thanked in his speech.

He thanked former mayor Mel Lastman for hiring him and for the support he showed Pennachetti in his early days with the city.

Pennachetti said he wished to thank former mayor David Miller both for recommending his promotion to city manager, but also for his leadership and support of the public service.

"Thanks to Mayor Miller for the vision and political leadership in convincing the provincial government to approve the City of Toronto Act," said Pennachetti. "I believe strongly that this milestone was the key to setting the governance foundation for Toronto for decades to come."

He then spoke about Ford, saying the mayor "for the most part" allowed him to do his job.

"Over the past four years, your focus has been fiscal sustainability and customer service and I believe the Toronto Public Service has met those challenges," Pennachetti said, referring to Ford.

Pennachetti also thanked Deputy Mayor Norm Kelly "for your support personally and to all of management over the past year."

Kelly took on additional responsibilities in recent months, after council voted to strip Ford of selected powers in the wake of a drug-related scandal.

"Mr. Deputy, your leadership, diplomacy [and] co-operation with management assisted in expediting many key initiatives to executive committee and council," said Pennachetti. "You handled your difficult role with the tact, diplomacy and fairness of a true parliamentary leader."

Reporters later asked Ford about his reaction to Pennachetti's remarks.

"Obviously, we've had our trials and tribulations. The deputy mayor, after they stripped my powers, had to fill in. So, the last year, I know they worked closely," Ford said. "I know Joe [Pennachetti] has had to adapt to different situations presented to him and he's done a very good job at doing exactly that."

The city manager's speech came on the third day of a marathon council meeting, the last of the current session.