OTTAWA -- Canada's top justice will retire at the end of the year, the Supreme Court of Canada announced Monday afternoon.

Chief Justice Beverley McLachlin, who has been on the court for 28 years, will retire Dec. 15, 2017.

"It has been a great privilege to serve as a justice of the court, and later its chief justice, for so many years," McLachlin said in the news release announcing her retirement.

"I have had the good fortune of working with several generations of Canada’s finest judges and best lawyers. I have enjoyed the work and the people I have worked with enormously."

McLachlin started her career on the bench in Vancouver in April, 1981. She was appointed to the Supreme Court of British Columbia only five months later, and elevated to the B.C. Court of Appeal in December, 1985. She became the chief justice of the B.C. Supreme Court in September, 1988, and a Supreme Court of Canada judge less than a year later. She took over at the top of the Supreme Court of Canada in January, 2000.

Her 18 years leading the court makes her Canada's longest-serving chief justice, according to the court.

'Unparalleled' judicial accomplishments

"Chief Justice McLachlin's judicial accomplishments are unparalleled in Canadian history," Prime Minister Justin Trudeau said in the news release announcing her retirement.

"She has been a judicial leader and trailblazer for almost four decades. She is one of Canada’s very finest jurists."

McLachlin's departure not only opens a vacancy on the court but offers a chance for Trudeau to shape it through whomever he names as the next chief justice.

Most of the justices on the court right now were appointed by former prime minister Stephen Harper, with the exceptions of Rosalie Abella, who was appointed by Paul Martin, and Malcolm Rowe, whom Trudeau appointed last fall.

McLachlin grew up in Pincher Creek, Alta. and studied at the University of Alberta for her undergraduate and graduate degree, as well as her law degree.

Justice Minister Jody Wilson-Raybould said McLachlin told her Monday morning of her intention to retire. Supreme Court justices serve until age 75; McLachlin turns 74 in September.

Wilson-Raybould says she received the news "with deep honour and respect for the chief justice for her years of trailblazing."

"She has made so many seminal judgements that have further defined who we are as Canadians," the justice minister said, though she declined to name a favourite decision.

She also declined to discuss what qualities she thinks McLachlin's successor should have.

"Questions about the replacement of the chief justice are questions for tomorrow. Today is a day to celebrate her legacy, what she's contributed to our country and its evolution, and I'll be forever grateful to have had the opportunity to work with her."

In a written statement, Wilson-Raybould noted McLachlin blazed trails at every step of her career through a legal profession overwhelmingly dominated by men.

"She has guided the development of the law and the Constitution, but never lost sight of the need for the law to remain relevant to the people it is intended to serve. She has been a tireless champion of Canadians' right to a fair, accessible and efficient system of justice that responds to their needs and aspirations, and to our evolution as a nation and its reconciliation with Canada’s indigenous community," she said.

'Deep sense of fairness'

NDP Leader Tom Mulcair says McLachlin sat on the court as Canadians were learning to apply the Charter of Rights and Freedoms.

"She's left her mark on the legal culture of our country for a full generation, but that will echo for generations to come," Mulcair said outside the House after question period.

McLachlin leaves big shoes to fill, he said.

"We need someone with deep experience, deep legal understanding and a deep sense of fairness -- something that Madame McLachlin had on every score."

Conservative deputy justice critic Michael Cooper spoke to reporters about McLachlin's legacy, although both Conservative Leader Andrew Scheer and justice critic Rob Nicholson -- a former justice minister -- were in the House for question period.

Cooper said Nicholson was out of town, despite the fact he was in the chamber minutes before.

"There's no question that Madame Justice McLachlin has served the court and served Canadians with distinction," Cooper said.

"Madame Justice McLachlin has been a real trailblazer as a woman. She has served for 17 years as chief justice... she has been a very strong jurist and today certainly is a day to look back on her many years of service to Canada."

The Conservatives clashed with McLachlin while they were in government, culminating with Harper accusing McLachlin of trying to interfere in the 2013 appointment of Marc Nadon -- an appointment ultimately found to be invalid due to specific rules governing the qualifications of Quebec-appointed judges.

The court issued a rare public statement on McLachlin's behalf to counter Harper's assertion that she had wrongly tried to speak to him about a case before the court (the Supreme Court heard the challenge regarding Nadon's appointment).

McLachlin said in the statement that she had tried to contact Harper months before the appointment about a potential eligibility problem with one of the potential candidates.

"Given the potential impact on the court, I wished to ensure that the government was aware of the eligibility issue," McLachlin said in her 2014 statement.

"At no time did I express any opinion as to the merits of the eligibility issue. It is customary for chief justices to be consulted during the appointment process and there is nothing inappropriate in raising a potential issue affecting a future appointment."

A number of legal experts and high profile Canadians reacted quickly on Twitter.

Former prime minister Kim Campbell said McLachlin taught her in law school.

"Grateful for her service!" Campbell wrote.

Kyle Kirkup, an assistant professor at the University of Ottawa's law school, called McLachlin a force of nature and referred to the court eventually siding with her on legalizing assisted dying, 22 years after she had written a dissenting opinion in favour of it.