Calgary's mayor issued a statement Monday in which he apologized to those who were offended by one of the comments he made during a Twitter tiff with Sun News personality Ezra Levant on Sunday.

During an exchange about the Mayor Nenshi's interactions with employees of the Pembina Institute — an environmental think tank the city has hired to do consulting work — Nenshi responded to what he perceived as a loaded question from Levant with the tweet: "When did you stop beating your wife?"

"If Mr. Levant or anyone else was truly offended by my use of this phrase, of course I apologize," Nenshi said in a prepared statement released Monday.

The phrase is well-known among law and media circles as referring to a loaded question, in which certain controversial truths are assumed by the questioner in an attempt to trap the person answering.

"You attack my wife, accuse me of a crime, and I'm the insulter," Levant tweeted in response to Nenshi's question on Sunday.

The exchange quickly turned into a series of personal attacks between the two, with Nenshi saying that Levant knew the true meaning behind the question because of his background in law and media.

"Since Mr. Levant was my debating partner for many years and did attend law school, I know he knows what this phrase means," said Nenshi in his statement. "In fact, I've heard him use that line in many debaates himself. He is now trying to make an issue of my use of that phrase."

In his statement, Nenshi then addressed concerns with Levant's reporting track record.

Nenshi also attached a copy of a letter he had sent to Levant's employer, Sun Media, in which he noted several concerns with a column Levant had written in 2012.

Levant responds to statement

On Twitter, Levant stated his displeasure with Nenshi's statement and apology.

"This is the letter of an angry students union president. It is beneath the mayor of a great & serious city," he tweeted. "A classic, grudging @nenshi non-apology. 'I'm sorry if you were offended'. Too vain and proud to say sorry."

At City Hall on Monday, the mayor refused to answer questions from reporters about the spat.

Meanwhile, Calgarians have taken to Twitter to voice their thoughts on the tiff.

"Now, now, @nenshi very politely accused Ezra of spousal abuse. Didn't curse or anything. Really very polite," wrote one user, @clivepacker.

"'When did you stop beating your wife' was taught to us in first year law school," wroter another user, @immlawyercanada.

What do you think of the Mayor Nenshi/Ezra Levant Twitter tiff? Post your thoughts in the comments section below or tweet us at @CBCCalgary.