Year in and year out, Stephen Harper's government has cranked out changes to the Criminal Code to create new offences, increase sentences and promote a tough-on-crime philosophy that puts victims' rights at the heart of Canada's justice system.
But Canada's Conservative Prime Minister has known from the start that in order to achieve all of his goals, he also had to oversee changes on judicial benches across the country.
"He once asked me, 'If I become Prime Minister, what's the most important thing to do?'" Tom Flanagan, a former adviser to Mr. Harper, said in an interview. "I said that he had to do something about the courts in this country. I think any Conservative prime minister would feel an obligation to rebalance the judiciary, because after so many years of Liberal prime ministers, it had tilted left."
On Friday, Mr. Harper's plans suffered a major blow when the Supreme Court blocked the appointment to its bench of Justice Marc Nadon, who was known to share some of the Prime Minister's legal viewpoints. The 6-1 decision, which created an immediate vacancy among the three seats allocated to Quebec on the Supreme Court, highlighted the increasingly tense relationship between the government and the judiciary.
Conservative insiders lamented the fact that lower-court judges across the country have been failing to implement their crime agenda, and that some of their legislative changes have been struck down.
Senior Conservatives said privately they were surprised and disappointed by the court's decision in the Nadon case. One official said the government considered the decision to be "bizarre" and said the Conservatives had felt they had sufficient legal opinion on their side.
"Two former Supreme Court judges and the country's leading constitutional expert all said there is no obstacle," a source said.
The next step in the process has yet to be determined as the government reviews its options, including trying another way to appoint Mr. Nadon or finding a new candidate. Still, there is a sense in Ottawa that overseeing a philosophical change in the judiciary is a long-term process, starting in lower courts before the judges with a small-c conservative bent move up the ranks.
The government now has a series of judicial appointments to make in lower courts in Quebec, to fill vacancies from which future Supreme Court judges will be picked. The hope, one Conservative official said, was to have a greater pool of judges who are in line with "ongoing reforms" to the justice system.
Mr. Harper's initial appointments to the Supreme Court were non-controversial, but Mr. Flanagan said that they were "quietly tilting to the right" in recent years.
The fact that the government felt the need to obtain legal advice on Mr. Nadon's appointment in the first place is evidence of just how controversial the decision was, NDP justice critic Françoise Boivin said.
"It showed from the start how wrong it was and that it was bound to create problems," she said. "Again, this government … they love to hit the wall."
Ms. Boivin, who was a member of the selection panel given the task of narrowing down a government list of Supreme Court candidates, said there are significant concerns about whether new legislation is being properly vetted to ensure it does not violate the Constitution. She added that she hopes recent Supreme Court decisions, including a ruling on Thursday that struck down a portion of the Abolition of Early Parole Act, will lead the government to reconsider its approach to constitutional matters.
"We have the right to be really wondering who is minding the constitutional house," Ms. Boivin said. "Is that job being done?"
In Quebec, where Mr. Harper's choice of Mr. Nadon was roundly dismissed with a unanimous vote by the Quebec National Assembly, the Supreme Court's ruling was embraced by all major party leaders on the campaign trail.
"It proves exactly that what we defended was right and demonstrates that when Quebec stands up for itself it can succeed," Parti Québécois Leader Pauline Marois said. "In this case, there could have been no other decision. Mr. Harper erred when he appointed Justice Nadon."
Liberal Leader Philippe Couillard said the ruling was proof that the federal system works for Quebec and the provinces, and demonstrated that the federal government cannot unilaterally impede Quebec's legal tradition and its civil law.
"It shows that there are institutions in the country that ensure that a balance is respected and recognizes the rights of provinces," Mr. Couillard said.
But Coalition Avenir Québec Leader François Legault said the decision in no way proves that Canadian federalism automatically protects Quebec's interests. The Supreme Court decision, he said, only requires that the province's three judges on the bench must come from Quebec.
"This has nothing to do with the way federalism works for Quebec," Mr. Legault said.
With a report from Rhéal Séguin