Gérald Tremblay has stepped down as mayor of Montreal, taking a hint of responsibility for the scandals that have paralyzed his city while unloading bitterness at the onetime allies he says betrayed him.

The mayor of Canada’s second-largest city is the first elected official to go down in the vast wake of Quebec’s Charbonneau corruption inquiry, but he’s unlikely to be the last. The inquiry has just started digging, and the names of former prominent provincial Liberal cabinet ministers, other mayors and Liberal Party officials have already figured prominently.

Mr. Tremblay said he was left in the dark from the start of his time as mayor in 2001 and has suffered “an unbearable injustice” from evidence exposed just last week at the inquiry – testimony accusing him of knowing his party was collecting and spending illegal cash.

“After 25 years, I’m leaving public life,” Mr. Tremblay said in a brief speech Monday night in the Hall of Honour, a cavernous marble chamber at the heart of City Hall. “My father told me to never get into politics because it was dirty and it would destroy me. But my passion and love for Quebec and Montreal set the path I had to follow.”

Mr. Tremblay, who leaves a year before the end of his mandate, says trusted associates reassured him for years that there were only rumours and no evidence of collusion, graft and rampant illegal party fundraising that have now been confirmed by multiple sources at the inquiry.

Mr. Tremblay said one of his first acts after taking office in 2001 was to ask about rumours that envelopes of cash were circulating in City Hall. He says the city manager told him there were only rumours – no proof. He acknowledged his ignorance went on for years, but said when he discovered wrongdoing, he sought another mandate in 2009 to clean things up.

He acknowledged he sometimes acted too late to prevent scandals, such as an infamous $355-million water-meter contract that went to a firm controlled by Tony Accurso, a construction magnate and alleged fraudster who, the inquiry has heard, had strong Mob connections.

Mr. Tremblay cancelled the contract with its runaway costs in 2009, but cited it as an example of one that would have never been signed if underlings hadn’t withheld information.

While not naming names, Mr. Tremblay’s top target was clear. Frank Zampino, his former right-hand man who is now up on fraud charges, left office after revelations he took a luxury cruise on Mr. Accurso’s yacht, The Touch. Mr. Tremblay made it clear he has not had his last word on such betrayal.

“The trust I had in some was inevitably betrayed. I assume the full responsibility,” Mr. Tremblay said. “I now must suffer an unbearable injustice. I never thought my life would be subjected to such a fury in a society of law and justice. But one day, justice will prevail.

“One day the hidden agenda of certain people will come to light.”

While Mr. Tremblay rushed to portray himself as an innocent victim, his resignation comes amid growing evidence he knew he was presiding over rot at city hall, but avoided getting involved.

His position became untenable last week when Martin Dumont, a former organizer from his party, Union Montréal, accused the mayor of having firsthand knowledge that his party was spending illegally during a byelection in 2004.

Mr. Dumont said he was at a party office complaining about overspending in 2004 when a party official produced a sheet of paper showing two accountings – one to satisfy the chief electoral officer and another in illegal cash. Mr. Dumont said Mr. Tremblay declared, “I don’t need to know this” and walked out of the room.

Mr. Tremblay again vehemently denied the allegation Monday, as he has several times in the week since it was made. “The meeting never happened,” he said.

Richard Bergeron, leader of the opposition Projet Montréal party, congratulated the mayor for his decision and said it will allow Montreal to emerge from its “permanent crisis.” An interim mayor will be chosen by city council, which is dominated by the mayor’s party. The next general election is in November, 2013.

“The Tremblay era is closed,” Mr. Bergeron said.

Louise Harel, leader of the opposition Vision Montréal party, said the mayor had to go because he had lost Montrealers’ trust. The mayor’s protests that he had been betrayed were “pathetic,” she said.

Mr. Tremblay came to municipal politics from the provincial Liberal Party, which included a stint as a cabinet minister under Robert Bourassa which started in 1989.

The Charbonneau commission on corruption has so far concentrated on Montreal city hall. and the mayor’s party, hearing that the party collected hundreds of thousands of dollars – if not millions – in illegal donations during the mayor’s time in office.

The inquiry has also heard civil servants and politicians under the mayor were collecting a fortune in bribes. The kickbacks came from construction companies that made tens of millions from the inflated contracts the civil servants and political figures were pushing through city hall.

Mr. Tremblay is not the only mayor of a big Quebec city who is affected by corruption allegations. Gilles Vaillancourt, the mayor of Laval, the province’s third-biggest city, is on sick leave after his office and homes were raided repeatedly by the province’s anti-corruption squad. Several media reports suggest he will resign this week.