Retiring Supreme Court Chief Justice Beverley McLachlin says public trust in a vital democratic institution was at stake in an extraordinary public battle between her and former prime minister Stephen Harper.

In her first public comments on the dispute, McLachlin told CBC News that Harper's claim that she had acted inappropriately by trying to contact his office could have undermined the administration of justice in Canada.

"I was worried that any such allegation could tarnish the administration of justice, could tarnish the office of chief justice, could tarnish the court," she said in a wide-ranging interview with The National's co-host Rosemary Barton. "That was my main concern.… But it turned out, I think, quite well."

McLachlin, who retires Friday after 28 years on the Supreme Court, including 17 as chief justice, said she was "shocked" by Harper's public accusation that she tried to meddle in the Conservative nomination process to pick a Quebec judge to the high court.

She said she first learned of the political broadside from the front page of her morning newspaper.

McLachlin said she was in Moncton, N.B., for a speaking engagement at the time in May 2014 and was up early to catch a morning flight back to Ottawa, when she read Harper's accusations in a story on the front page of the Globe and Mail. She says she was "astounded," and took some time to consider how to respond.

'Public is entitled to the facts'

"I knew I hadn't done anything wrong, and I spent a rather miserable two hours, or 2½ hours, on the flight figuring out how this could have happened and what was going on," McLachlin told CBC News.

"When I got back to the office, I thought about it and I said, well, you know, I'm not going to get into into a fight. Judges can't get into fights with politicians. We have to just be quiet if we are accused normally. But I do believe the public is entitled to the facts."

In the end, McLachlin issued her own news release with a timeline of events and a series of numbered facts.

Declining to speculate on the former prime minister's possible "motivations," McLachlin said she believes, in the end, that Canadians understood how the events unfolded.

It was May 1, 2014, when Harper's office issued a news release suggesting McLachlin had tried to engage in an inappropriate conversation about a case.

Retiring Supreme Court Chief Justice Beverley McLachlin discusses what it was like to get into a high profile spat with prime minister Stephen Harper. 1:38

"Neither the Prime Minister nor the Minister of Justice would ever call a sitting judge on a matter that is or may be before their court," it read. "The Chief Justice initiated the call to the Minister of Justice. After the Minister received her call he advised the Prime Minister that given the subject she wished to raise, taking a phone call from the Chief Justice would be inadvisable and inappropriate."

McLachlin said she had never intended to call the prime minister, since she had already flagged her concerns in a call to Peter MacKay, who was justice minister at that time.

Timeline of events

She said the call was to raise a general red flag about eligibility requirements for Quebec nominees under the Supreme Court Act, not to question the validity of one specific person, and that the call was made before the nomination of Marc Nadon.

Unnamed Conservatives had been quoted suggesting that McLachlin had lobbied against the appointment of Nadon, who was a member of the federal court of appeal.

"The suggestion they were trying to make was that I had tried to influence against the appointment of a certain justice. At the time, the only time I made a call, that justice's name wasn't even thought of," she said. "It was months later that it first was raised, so it was absolutely impossible, what they were suggesting, and so all I did was set out the timeline and the timeline was sufficient, I think, to make the point."

Marc Nadon was nominated as a Quebec representative to the Supreme Court, but his appointment was ultimately declared invalid because of rules under the Supreme Court Act. (Adrian Wyld/Canadian Press)

In the end, Nadon's appointment as a Quebec representative on the high court was ruled constitutionally invalid, because he had been a federal court judge in Ottawa for 20 years, was not a sitting Quebec superior or appeals court judge, and was not a current member of the Quebec bar.

MacKay called the episode "unfortunate" and said, in hindsight, things that happened and that were said could have been avoided.

He recalls the phone call he took from McLachlin on July 31, 2013, when he was at the Whitehorse airport, but declined to divulge details of the "private conversation."

He did say however that, had the roles been reversed, he would have had to resign for trying to influence a decision of the court.

"That's what was deemed inappropriate," he told CBC News.

MacKay said the appointment of a Supreme Court justice is the sole power of the prime minister, and recalled that Harper received a legal opinion supporting the validity from former justice Ian Binnie.

MacKay, who is now a lawyer in private practice, maintains that Nadon was qualified to serve on the high court despite the ruling.

It's the end of an era as Beverly McLachlin's time as Chief Justice of the Supreme Court of Canada is now over. The At Issue panel looks at her legacy, as well as the federal government's latest attempt to push tax reform in Canada 9:16

The public spat marked the height of what had become a period of strained relations between the top court and the Harper Conservatives.

Asked by Barton to respond to allegations from some Conservatives that the Supreme Court had become "activist" in terms of social policy, McLachlin said the court is only doing its duty required by the 1982 Charter of Rights and Freedoms.

Charter changed judiciary

Tensions between politicians and the judiciary were heightened in the 1980s and 1990s, when the court began regularly ruling on cases that determined whether laws upheld or violated constitutional rights.

McLachlin said the Constitution changed the role of the judiciary, moving from parliamentary supremacy to a constitutional system where judges are asked to determine whether laws conform with the Charter.

"It was a sea change and for a lot of people, they didn't agree with that change," she said. "But the fact is, it became the law of the land. It became the Constitution and as a judiciary, the judiciary had no choice but to uphold that law."

The high court struck down a number of laws brought in or protected by the Conservatives, including mandatory minimum sentences, medical marijuana and prostitution laws.

But McLachlin declined to comment on whether that reflects on the quality of the legislation brought in under Harper's Conservatives and whether there was "over-reach."

"Well, you know we take what we get. If you send us a certain law, we have to judge it objectively and in accordance with the principles that have been laid down," she said. "And so that's all we do. But we definitely don't get partisan or anything like that and we simply have to call it as we see it."