Toronto Mayor John Tory is stepping down from the job on Friday.

Tory submitted his resignation letter to the city clerk on Wednesday evening, informing John D. Elvidge that he will leave the mayor's office on Feb. 17 at 5 p.m.

In the letter, Tory said he will spend the next two days in meetings with city staff and Deputy Mayor Jennifer McKelvie, who will take over some of the mayor's responsibilities after he vacates the office, to ensure an orderly transition.

"I want to thank the people of Toronto for trusting me as Mayor since 2014. I continue to be deeply sorry and apologize unreservedly to the people of Toronto and to all those hurt by my actions without exception," Tory wrote.

"This has been the job of a lifetime, and while I have let many people, including myself, down in this instance, I have nonetheless been deeply honoured by the opportunity to serve the people of this wonderful city for more than eight years and I hope I achieved some good for the city I truly love."

In a statement, the city confirmed that the clerk received Tory's resignation notice, saying Elvidge is working with the city manager and McKelvie on the next steps.

"The resignation of the Mayor does not affect mayoral appointments to Committees or other bodies. All mayoral decisions made to date remain in effect," the statement read.

According to the City of Toronto Act, a by-election must be held to choose the next mayor.

City council will have to declare the office of the mayor vacant during its next meeting, which is scheduled to take place on March 29, and call for a by-election.

The clerk will then set a deadline for when candidates can file their nomination papers. According to the Municipal Elections Act, election day would occur 45 days after the nomination deadline.

Tory's resignation letter came an hour after the 2023 capital and operating budgets passed. He had said that he will leave the post once the budget process was over.

It was five days ago when Tory announced his intention to step down as mayor during a last-minute news conference where he disclosed his affair with a staff member from his office during the pandemic.

He said the relationship, which "did not meet the standards to which I hold myself as mayor and as a family man," ended mutually this year.

"While I deeply regret having to step away from a job that I love, in a city that I love even more, I believe in my heart, it is best to fully commit myself to the work that is required to repair these most important relationships," Tory said.

Some councillors known to be the mayor's key allies had been trying to convince him to reconsider his decision. Before Wednesday's budget meeting, Speaker Frances Nunziata said, "It will be a disaster if he resigns," and suggested Tory take a leave of absence.

Meanwhile, a Forum Research poll of more than 1,000 residents conducted earlier this week found that Torontonians are split on Tory's decision to resign.