Scotland's most senior judge has announced his intention to retire following the longest judicial career in Scottish history.

Lord Brian Gill, 73, will retire on May 31 concluding a legal career spanning 48 years in which he has served 21 years as a judge.

The Judicial Office for Scotland said: "In the course of a distinguished legal career he has presided over some of the most significant changes to the Scottish legal system in over a century, in particular the implementation of the proposals of the Scottish Civil Courts Review, which he led, as well as some major changes to criminal appeal procedure which are in the process of being implemented.

"The First Minister will now establish a panel to recommend individuals who are suitable for appointment to fill the vacancy."

James Wolffe, QC, dean of the Faculty of Advocates, said: "Lord Gill's career has been one of outstanding service to Scotland's legal system.

"At the bar, he was an incisive advocate in great demand. A learned Keeper of the Advocates Library, he authored the leading textbook on agricultural law.

"During his career as a judge, he has contributed greatly to the development of the law in judgments characterised by lucid prose and clarity of analysis."

He added: "Although Lord Gill has announced his retirement, he has not yet quite retired. At this moment, I pay tribute to all that he has done so far for the law in Scotland and I wish him a long and happy retirement when that day arrives."

Alistair Morris, president of the Law Society of Scotland, said: "The Lord President has been a much respected figure throughout his highly distinguished legal career.

"He has long been committed to reform and the modernisation of Scotland's justice system.

"Under his leadership the Scottish Civil Courts Review resulted in far-reaching proposals for change and he leaves an important and lasting legacy when he retires at the end of this month.

"The timetable for civil justice reforms, set out by the Lord President in January this year, will transform our civil courts.

"Better use of technology, improved administration systems and greater judicial specialisation will make our courts more efficient, more accessible for court users and will help improve access to justice.

"We have had a very constructive working relationship with the Lord President during his time in office and on behalf of the Law Society of Scotland, I wish him well for his retirement."

Lord Gill was appointed Lord President and Lord Justice General in June 2012 having held the position of Lord Justice Clerk and President of the Second Division of the Inner House from November 2001

He was appointed a Judge in 1994. Lord Gill is chairman of the Lands Valuation Appeal Court and was chairman of the Scottish Law Commission from 1996 to 2001.

He is a graduate of the universities of Glasgow (MA, LLB) and Edinburgh (PhD), and has been awarded the honorary degree of LLD by the universities of Glasgow (1998), Strathclyde (2003), St Andrews (2006), Edinburgh (2007) and Abertay (2008).

He is a fellow of the Royal Society of Edinburgh and a fellow of the Royal Scottish Academy of Music and Drama.

Lord Gill lectured in the Faculty of Law of Edinburgh University before being admitted to the Faculty of Advocates in 1967.

He was appointed Queen's Counsel in 1981. He is a member of the English Bar (Lincoln's Inn, 1991; Bencher 2002).

He was an advocate depute 1977-1979; Standing Junior Counsel to the Foreign and Commonwealth Office (1974-1977), the Home Office (1979-1981) and the Scottish Education Department (1979-1981); and Deputy Chairman of the Copyright Tribunal (1989-1994). He was Keeper of the Advocates Library 1987-1994.

He is the author of The Law of Agricultural Holdings in Scotland (3rd ed, 1997) and founder and general editor of the Scottish Planning Encyclopaedia.

In 2008, he was appointed by the UK and Scottish governments to chair the public inquiry into the fatal explosion in 2004 at the ICL factory in Glasgow.

Lord Gill was chairman of the Scottish Civil Courts Review (2007-2009). He is chairman of the Council of the Royal School of Church Music.

When the office of Lord President is vacant, anything falling to be done by the Lord President will now be done by the Lord Justice Clerk.

Justice Secretary Michael Matheson said: "Lord Gill has given outstanding public service both in his role as a judge and as the Lord President and Lord Justice General.

"Lord Gill is an eminent individual of great stature and integrity who has led Scotland's judiciary with distinction, and with a clear vision for the continuing modernisation of the Scottish courts system.

"He has demonstrated a clear commitment to reform which has led to substantial improvements to the justice system in Scotland.

"His far-reaching proposals for the reform of the civil courts in Scotland will be a lasting legacy and have led to the greatest changes in our courts system for over a century."