Saguenay Mayor Jean Tremblay said he will comply with the judgment even though he doesn't agree with it.
"I respect the decision and we will stop the prayer, for sure, but I can't be in agreement with it after having fought for so long," he told a news conference.
The Supreme Court ruled Wednesday that the reading of a Catholic prayer at council meetings infringes on freedom of conscience and religion.
Canadian society has evolved and given rise to a ''concept of neutrality according to which the state must not interfere in religion and beliefs,'' the judgment said.
"The state must instead remain neutral in this regard."
The ruling ended an eight-year legal battle that pitted atheist Alain Simoneau and a secular-rights organization against Tremblay.
The mayor expressed surprise at the judgment, especially as the Quebec Court of Appeal had previously ruled unanimously in his favour.
"We thought the matter was over, considering the appeals court is the highest court in Quebec and especially as the Supreme Court only handles cases of national interest," he said.
"And we thought that in our case, national interest was a bit exaggerated.
"We were shaken by the ruling. I'll tell you it was a real surprise. Unanimous. That was a surprise."
The Supreme Court did not rule on the legality of religious symbols — and that prompted Tremblay to urge governments other than at the municipal level to get involved in defending the presence of such objects in city halls and legislatures.
He also made a passionate plea in favour of Quebec traditions.
"The regulation on the prayer, which was adopted before I became mayor, appealed to tradition, to our customs as Quebecers," Tremblay said.
"Nationalism is part of it as well. Quebec nationalism isn't just belonging to a political party. Nationalism is our will to exist, based on language, our traditions, our customs.
"A nation must remember its past. That's what makes a nation strong and rich."
He said he believes in the neutrality of the state but that "being neutral does not necessarily mean rejecting religion."
The Supreme Court judgment had an immediate impact in some cities and towns across the country, with Ottawa Mayor Jim Watson suspending prayers at a city council meeting and the mayor of Levis, Que., saying he'll do the same next week.
The Speaker of the New Brunswick legislature said Thursday it's too soon to say if the Supreme Court decision will have an impact on the daily prayer in the legislative assembly.
Legislature staff are studying the ruling and will forward their findings to a committee of the legislature for a decision, said Chris Collins, who added there will be a prayer when the legislature sits again Tuesday.
In Oshawa, Ont., Mayor John Henry said the judgment will not change anything in his city.
"During the preamble prior to the (council) meeting I ask members of the audience if they'd like to join us in a moment of personal reflection or the Lord's Prayer and then we follow up with O Canada and then we call the meeting to order," he said Thursday.
"You can choose to say it, not say it, you can participate or not participate...I start it prior to the meeting so it's not part of formal council process."
"It started long before I became mayor and the practice will still continue. But Canada is one of these countries where you have a number of options, you have freedom of religion or freedom not to practise religion. People from around the world dream of coming to this country to do both."
A spokesman for the Ottawa-based Canadian Conference of Catholic Bishops said it won't comment on the ruling.
Also on HuffPost