SNP MSP Brian Adam was remembered as "an outstanding politician and an exceptional human being" by Scotland's First Minister today as hundreds of mourners paid their last respects at his funeral.

Mr Adam died at his home in Aberdeen last Thursday following a lengthy battle with cancer. He was 64.

About 400 people attended the funeral service at the city's Church of Jesus Christ of Latter-Day Saints.

Among them were his wife Dorothy, children Neil, Jamie, Sarah, David and Alan, as well as friends and colleagues from across the political spectrum.

Well-known faces from the world of Scottish politics at the service included Deputy First Minister Nicola Sturgeon, Finance Secretary John Swinney, SNP MP Angus Robertson and First Minister Alex Salmond, who spoke at the ceremony to celebrate the life and legacy of the Aberdeen Donside MSP.

In a speech referencing the late MSP's strong connections to the north east of Scotland, the SNP leader said: "Brian Adam was a loving family man, a loyal friend, an outstanding politician, an exceptional human being and someone of steadfast faith.

"He was also a plain-speaking man, who did not need to use flowery language - because the passion of his commitment, loyalty and love spoke for itself.

"So, in that same spirit, let me simply say that Brian was a fine loon - which, as he would understand, says everything about a person that is good. And everything about Brian was good."

In a wide-ranging tribute, Mr Salmond spoke of Mr Adam's religious faith, his work in politics and his courage in coping with illness.

Describing the late politician as someone who would "do anything for anyone", he went on: "Brian's advice to colleagues was often to say 'Only ever promise to do your best'.

"That is what he always did - and Brian's best as a husband, father, politician, churchman, as a man, was the best there is.

"He always encouraged others - one of the reasons so many students turned out to help him get elected as a councillor the first time round and thereafter was because he took the time to talk to the SNP student groups in Aberdeen, and advise them of the way forward and how to grow.

"He gave so much of himself to others - we all tried in our own ways to repay the debt, but the final balance sheet of Brian's life is one of overwhelming credit. Brian spent himself in the cause of his fellow citizens."

All of the major political parties were represented at the funeral.

North East MSPs Richard Baker and Lewis Macdonald were among the Labour representatives present, while the Tories' Alex Johnstone also attended.

Also present were Liberal Democrats Lord Stephen and Sir Malcolm Bruce.

The funeral began with a hymn and prayers before the congregation heard tributes from the late MSP's brother Rodney Adam and son Neil.

A rendition of Robert Burns' A Man's A Man, For A' That was also performed during the service, ahead of Mr Salmond's speech.

The First Minister then recalled how Mr Adam grew up in Banffshire and spent his whole life in the north east of Scotland, which he loved.

He initially embarked on a career in biochemistry and went on to become principal NHS biochemist at Aberdeen Royal Infirmary, before turning to a life in politics, the congregation heard.

"Brian succeeded in everything he did, because he approached every job he had with enthusiasm, his own God-given talent, and above all with dedication," said Mr Salmond.

"Brian dedicated himself to others. And when he did choose to get involved in elected politics in the late 1980s, he did so in a genuine - some would say old-fashioned - spirit of public service.

"But that was the only kind of politics Brian knew - because that was the kind of man he was, all of his days."

On Mr Adam's political career, the First Minister said: "When Brian was elected in May 1988 he was the only SNP councillor in this entire city - an entire one-man group.

"He spent the election campaign assuring me he was going to win - and reassuring his wife Dorothy that he had no chance whatsoever of winning!

"He served with distinction from 1988 to 1999 as a councillor on Aberdeen District, and then Aberdeen City Council, for the Middlefield and Heathryfold ward.

"It says everything about Brian that where he led, so many others wanted to follow. They knew that if Brian stood for something it had to be good and true - because he was good and true."

Mr Salmond said the late MSP had an "unblemished record of service" as an MSP, firstly for the North East region, and later as an Aberdeen constituency member.

He said: "In all these years as a councillor and MSP, Brian would do anything for anyone - nothing was too much trouble, whether it was a big issue affecting all his constituents or a small local problem.

"The people Brian represented so assiduously for so long knew him to be a man of great integrity. They respected his words because they admired his deeds."

He went on: "In ancient times, Sparta had no walls. It was said it did not need them because its people were its walls. People of the calibre of Brian Adam are the walls of Scotland.

"For those of us privileged to have known Brian, it is up to us to make his vision our reality. He was the finest loon."

The funeral was followed by a burial at Dyce Cemetery.