Image copyright Getty Images Image caption Tavish Scott at Murrayfield after being elected as Scottish Liberal Democrat leader in 2008

Former Scottish Lib Dem leader Tavish Scott is to quit Holyrood.

Mr Scott, who was elected in the first Scottish Parliament election in 1999, will step down as the MSP for Shetland in July to take up a new job with Scottish Rugby.

The former transport minister was leader of his party from 2008 to 2011.

The move will trigger a by-election in the Shetland constituency, which Mr Scott holds with a 44% majority - the safest seat by percentage in Scotland.

Mr Scott was a Shetland Islands councillor before he was elected to Holyrood, and is one of only five MSPs who have represented the same constituency seat continuously since the parliament was set up in 1999.

He said it had been "an enormous privilege and honour" to have served the islands for 20 years, adding: "There have been many highlights, wonderful moments and intense political drama that I would not have missed for anything.

Image copyright Getty Images Image caption Mr Scott has been MSP for Shetland since 1999

"I leave the Liberal Democrats at an exciting time in the party's development. There have been excellent recent results in the recent European elections, improved poll ratings and there is genuine optimism about the future for the party."

Mr Scott was a minister in the Labour-Liberal coalition governments in the early years of the parliament, serving as deputy finance minister and later transport minister.

He took over as Scottish Lib Dem leader in 2008 after the resignation of Nicol Stephen, but quit after the party lost a dozen seats in the 2011 Holyrood election.

His successor, Willie Rennie, said Mr Scott had been "a loyal servant of the Liberal Democrats and the people of Shetland".

Mr Scott has been appointed as Scottish Rugby's head of external affairs. The group's chief operating officer, Dominic McKay, said he was "delighted to have secured someone of Tavish's experience" for the job.