US whistleblower Edward Snowden has been elected rector of Glasgow University.

The computer analyst was nominated by a group of students who said they had received Mr Snowden's approval through his lawyer. He defeated cyclist Graeme Obree, author Alan Bissett and the Rev Kelvin Holdsworth.

Mr Snowden became a wanted man when his leaks brought to light secret National Security Agency documents which revealed widespread US surveillance of phone and internet communications.

He is living in Russia where he was given temporary asylum.

A statement from the group which nominated Mr Snowden said: "We are incredibly delighted to see Edward Snowden elected as the new Rector of Glasgow University.

"We have a proud and virtuous tradition of making significant statements through our rectors and today we have once more championed this idea by proving to the world that we are not apathetic to important issues such as democratic rights.

"Our opposition to pervasive and immoral state intrusion has gone down in the records.

"What is more, we showed Edward Snowden and other brave whistleblowers that we stand in solidarity with them, regardless of where they are.

"In the following weeks we will continue to campaign for the NSA and GCHQ to cease their assault on our fundamental right to privacy and for Edward Snowden to be recognised as the courageous whistleblower he is, rather than a traitor."

Previous incumbents have been elected as political statements, including Winnie Mandela in 1987 and Israeli whistleblower Mordechai Vanunu in 2005.

The election was held under the single transferable vote system. Mr Snowden received 3124 votes in the first round and 3347 in the second. The nearest candidate was Rev Holdsworth, with 1563.

PhD student Chris Cassells said: "It's a clear statement from Glasgow students that they stand in opposition to pervasive state surveillance."

But some students expressed disappointed with the outcome.

Louise Wilson said: "It sucks. It's very disappointing but not surprising in the slightest.

"I'm all for political statements, but at a time when the university and students need the biggest say with all the cuts it's just not appropriate not to have a working rector."

Hannah McNeill added: "I'm furious. I think most people here are very upset about the result. We need an active rector."