KENNY MacAskill – one of the leading figures in the SNP for the past three decades – is to stand down at the Holyrood election next May.

The former Justice Secretary was replaced by Michael Matheson in Nicola Sturgeon’s new administration, following the independence referendum last September.

He was first elected to the Scottish Parliament for Edinburgh East and Musselburgh in 1999 and held on to the seat at subsequent elections through boundary changes.

A former solicitor, MacAskill said he had to fight for 25 years before he was elected during a period when the SNP was regarded as a minority party and struggled to have a public profile.

But forming the first SNP Government in 2007, Alex Salmond appointed MacAskill to the key Cabinet post and he became the longest serving Justice Secretary since devolution.

Last night MacAskill wrote to his Edinburgh Eastern constituency members to tell them he will not be seeking nomination again and will be drawing a line under his career in frontline politics.

In his letter he described how the once safe Labour area had been transformed into “SNP heartland”, which was further cemented by Tommy Sheppard’s win to take the Westminster seat for the party at last month’s General Election.

“It has been a great privilege to represent the area in which I was born and live. That honour has been as a result of the trust you put in me and the support you gave to me over many years,” he said.

“The most significant change, though, has been the transformation of a once solid Labour seat into SNP heartlands. It started in 2007 when the breakthrough was made, continued in 2011 when boundary changes seemed to threaten, but has continued unabated as Tommy Sheppard’s outstanding victory has shown. With your continued efforts that is how it will remain, as Scotland continues on its road to independence. The journey may have been delayed last September but a Yes vote was won in Edinburgh Eastern. Come it will.”

He added: “It is, therefore, with a heavy heart that I have decided that it is time both for someone new and something new. Come next May I will have represented the constituency for nine years, and the wider area for 16 years. That is a long time – especially when heart and soul is put into it, as I endeavoured to do. As with stepping down from Ministerial office in November after seven and a half years as the longest serving Justice Secretary, there comes a time when it is appropriate for fresh blood and also for new challenges.”

The 57-year-old, formerly a senior partner in an Edinburgh law firm, who joined the SNP in the early 1970s, said he had always planned to stand down in May 2016, even if a Yes vote had been secured and he had become Justice Secretary in a new independent Scotland, heading an expanded department taking in security and immigration.

He told The National he would be embarking on “a third career” after he stood down and had “new challenges to pursue” in areas of interest to him.

“I’m proud of the commitment and efforts I made, but it will now be up to others to take things forward,” he said.

“I am not leaving parliament to retire but am leaving to pursue what might be considered a third career. Independence for Scotland will remain dear to my heart and I will be committed to it.”

His successor has radically changed policies introduced by MacAskill, including axing a new national women’s prison and shelving plans to abolish the requirement for corroboration in criminal cases, a cornerstone of Scottish justice.

MacAskill’s most controversial decision as Justice Secretary was the release of Abdelbaset al-Megrahi, the Libyan convicted of the Lockerbie bombing, from Greenock Prison in 2009 on compassionate grounds after he had been diagnosed with cancer. He died in Tripoli protesting his innocence in 2012. “It was the decision with the most pressures internationally, but we followed the laws and guidance and we ignored the external pressures to change,” he said. “The pressures went with the job but I had a great team around me in the justice department, the police and the prison service and for that I am humble. I stand by the decision now, as I did then.”

Reflecting on his career he said he was proud to have brought in a change in attitude towards young offenders as well as driving changes to make Scotland a fairer society, recognising that tackling crime went along with tackling inequalities.