Nationalist leader Alex Salmond is a step closer for a return to Holyrood after the SNP's north east list MSP was selected to fight a constituency.
Alex Salmond is the MP for Banff and Buchan
Richard Lochhead defeated former MP Annabelle Ewing and four other contenders to be the SNP's candidate in Moray at the next Holyrood elections.
The seat is currently held by the SNP's Margaret Ewing, who is stepping down.
The outcome means Mr Salmond could head the north east SNP list, making it more likely he will be elected as an MSP.
Mr Salmond will also fight a north-east constituency but can now return via the list, if necessary, without ousting Mr Lochhead.
Mr Lochhead is currently the SNP's spokesman on the environment, rural affairs, energy and fisheries.
He said: "I'm delighted to be given the opportunity to fly the flag for the SNP and retain the key Moray seat.
"I'd like to thank not only those members who voted for me, but all members who participated, as the turnout shows what a vibrant organisation we have in Moray.
"I look forward to carrying the campaign forward, and delivering one of many SNP victories in the 2007 election."
MP Annabelle Ewing, the daughter of Nationalist stalwart Winnie, came second.
At the last election Margaret Ewing won Moray with a 5,000 majority.
She is married to Fergus, MSP for Inverness East and son of Winnie.
Margaret Ewing said: "When I demit office in 2007 I will have represented the people of Moray for 20 years - a huge honour and responsibility.
"The members and activists of Moray SNP entrusted me with that role - it has been their unremitting commitment which has turned Moray into one of the safest seats in the course of Scottish independence."
The candidate selection was the first conducted by the SNP's new system of one member one vote. The turnout was 84%.