Alex Salmond has been the leader of the Scottish National Party twice
By Andrew Black
Political reporter, BBC Scotland news website
The story of the Scottish National Party is one of success and failure, highs and lows, rogues and visionaries - but most of all it's the story of a party which started life on the fringes and moved to claim political success.
Over the years the world has seen the rise and fall of many single-issue groups and minor parties, yet only a handful go on to achieve their goals.
The Nationalist's vision for independence is still out of reach, but, despite the party's turbulent history, it has emerged as the government of Scotland.
The SNP's spring conference in March this year was a bittersweet one.
The party met to set out ambitious plans for the UK election, but it was also mourning the death, at 86, of one of its former leaders, Billy Wolfe.
This was the man who finally transformed the SNP into a serious party, guiding it to its greatest Westminster electoral success in 1974.
The case for Scottish home rule goes right back to its unification with England in 1707.
The view that the Scots who put their names to the Act of Union had been bribed, famously spurred Robert Burns to write: "We are bought and sold for English gold. Such a parcel of rogues in a nation."
Many years later, the realisation that a pro-independence, election-fighting party was the way to go eventually led to the creation in 1934 of the Scottish National Party, through the amalgamation of the Scottish Party and the National Party of Scotland.
Robert McIntyre won the Motherwell and Wishaw by-election
But for years the party struggled to make an impact, party due to the on-going debate between those who wanted to concentrate on independence - the fundamentalists - and those who wanted to achieve it through policies such as devolution - the gradualists.
The young Nationalist party's other problem was that, put simply, it just was not any good at fighting elections, because of its lack of funding, organisation and policies beyond independence.
In its first test, the 1935 General Election, the SNP contested eight seats and won none.
It was not until a decade later and the Motherwell and Wishaw by-election when the party finally got a break.
When the contest was announced following the death of sitting Labour MP James Walker, the Nationalists sent in one of their up-and-comers, Robert McIntyre, to fight the seat.
After standing largely on a platform of Labour failures in post-war reconstruction, the SNP took the seat with 50% of the vote, but lost it months later in the election.
'Stop the world'
Even though this brief victory provided much excitement over what the party could achieve, it failed to make progress in subsequent elections and disquiet set in.
But it was this disquiet which forced the party to reorganise - a move which would help the SNP to one of its most famous achievements.
Winnie Ewing won 46% of the vote at the Hamilton by-election
The Hamilton by-election should have been a breeze for Labour, but, as the party's vote collapsed, the SNP's Winnie Ewing romped home on 46%, declaring: "Stop the world, Scotland wants to get on."
The 1970s was the decade of boom and bust for the SNP. They failed to hang on in Hamilton, but 1970 brought the SNP its first UK election gain, in the Western Isles.
That same decade also saw the beginnings of the party's "It's Scotland's Oil" strategy, which sought to demonstrate Scotland was seeing little direct benefit of the tax wealth brought by North Sea oil.
More success followed in 1973, when Margo MacDonald, "the blonde bombshell" won the Glasgow Govan by-election and, the following year, an under-fire Tory government called an election, which it lost.
The SNP gained six seats and retained the Western Isles, but lost Govan - however, there were to be further gains.
With Labour in power as a minority government, the party had little choice but to call a second election in 1974 - but not before committing to support for a Scottish Assembly.
Even so, The SNP gained a further four seats, hitting its all time Westminster high of 11.
Despite the success, tensions began to develop between those in the SNP who were elected and those who were not.
Then came 1979 - the year which provided two killer blows to the SNP.
Not only did Scots voters fail to support the establishment of a Scottish Assembly in a referendum, but Margaret Thatcher's Tories swept to power - meaning the constitutional issue was not only off the table, but had been completely blown it out of the water.
The SNP had also come under a period of heavy fire from rival parties, portrayed by Labour as the "Tartan Tories" and "Separatists" by the Conservatives.
With a post-election SNP slashed back to two MPs, the party needed a serious jump-start - but that jump-start dragged the party into a period which some thought would finish it off for good.
The start of the 80s was a torrid time for the SNP. Many in the party felt bitter that it had come so far but was now practically back at square one in terms of its performance and the independence argument.
The deep divisions gave rise to two notorious splinter groups.
One was the ultra-nationalist group Siol Nan Gaidheal, whose members used to march around in Highland dress, the other was the Interim Committee for Political Discussion - more commonly known as the 79 Group.
Formed to sharpen the party's message and appeal to dissident Labour voters, the group also embarked on a campaign of civil disobedience, spearheaded by the former Labour MP Jim Sillars, who had founded the Scottish Labour Party before defecting to the SNP in 1980.
More by-election success came when John Mason won Glasgow North East
The campaign took a radical turn when Sillars, with several other group members, broke into Edinburgh's old Royal High School building.
Then, a leak of 79 Group minutes to the media raised the prospect of links with the Provisional Sinn Fein. Despite claims the leaked version was inaccurate, the SNP's leader at the time, Gordon Wilson, had had enough.
His view that the party had to unite or die led to a ban on organised groups, but when the 79 Group refused to go quietly, seven of its members were briefly expelled from the party.
They included Scotland's future justice secretary, Kenny MacAskill, and one Alex Salmond.
The 1987 election saw another bad SNP performance. The party emerged with only three seats - but with the collapse in the Conservative vote, the constitutional issue was back.
Few people have done more for the Scottish National Party than Mr Salmond.
Despite previous form with the 79 Group, he had risen through the SNP ranks, becoming MP for Banff and Buchan and deputy leader of the party.
Mr Salmond did not have his work to seek on becoming leader in 1990. As well as having to deal with on-going issues over the party's independence policy - future minister Alex Neil had declared Scotland would be "free by '93" - there was an election to fight.
In 1992, the SNP increased its vote, but the party was only able to retain the three seats it already had, and lost Govan, which Mr Sillars re-took for the party in a 1988 by-election.
Mr Salmond moved to modernise the SNP, repositioning the party as more socially democratic and pro-European and pushing the economic case for independence.
Labour's commitment to a Scottish Parliament, delivered in 1999, was both a blessing and a curse for the Nationalists.
John Swinney led the party for four years
Although devolution presented a great opportunity for the SNP, many questioned how relevant a pro-independence party would be - George Robertson famously quipped devolution would "kill nationalism stone dead".
The SNP won 35 seats in the first election and also had two MEPs and six MPs.
But the best it could manage in 1999 was becoming the main opposition to the Labour-Lib Dem coalition government.
Mr Salmond's decision to quit as leader and an MSP came as a surprise. Despite much speculation over his reasons for returning to Westminster, ultimately, after a decade in the job, he decided it was time to step aside.
His successor in 2000 was John Swinney, but despite being among the party's brightest talent, his four-year tenure was plagued by dissenters from within.
The party dropped a seat in 2001 and despite a slick 2003 election campaign, the SNP once again ended up as the opposition and, later that year, a little-known SNP activist called Bill Wilson, challenged Mr Swinney for the leadership, accusing him of ducking responsibility for a "plummeting" SNP vote.
Mr Swinney won a decisive victory but was left weakened and, at Holyrood, SNP MSPs, Bruce McFee and Adam Ingram declared they would not support Mr Swinney in a leadership ballot.
Another, Campbell Martin, was flung out of the party after bosses found his criticism of the Swinney leadership damaged its interests in the run-up to the SNP's poor European election showing in 2004, where it failed to overtake Labour.
Mr Swinney quit as leader, accepting responsibility for failing to sell the party's message - but warned SNP members over the damage caused by "the loose and dangerous talk of the few".
When the leaderless party turned to Mr Salmond, he drew on a quote from US civil war leader General Sherman to declare: "If nominated I'll decline. If drafted I'll defer. And if elected I'll resign."
Then, in a move almost as surprising as his decision to quit, Mr Salmond launched a successful leadership campaign on a joint ticket with Nicola Sturgeon, winning a decisive victory.
Party members attended their 2010 conference in Aviemore
Nobody thought the 2007 Scottish election result could be so close. In the end, the SNP won the election by one seat, while Mr Salmond returned to Holyrood as MSP for Gordon.
With the SNP's pro-independence stance ruling out a coalition, the party forged ahead as a minority government.
The SNP government had promised to seek consensus on an issue-by-issue basis, but when the opposition parties thought the government was being disingenuous, they converged to reject the Scottish budget in 2009.
It was passed on the second attempt, but served as a reminder to the SNP the delicate position it was in.
Other key manifesto commitments also ran into trouble - plans to replace council tax with local income tax were dropped due to lack of support, while ambitious plans to cutting class sizes in the early primary school years ran into problems.
Such is life in minority government.
Although the SNP's focus had become the Scottish government, it was keen not to lose sight of its status beyond the Holyrood bubble and, in 2009, won the largest share of the Scottish vote in the European election for the first time.
Continuing its knack for winning safe Labour seats in by-elections, the SNP delivered a crushing blow to Labour, winning Glasgow East by overturning a majority of 13,507 to win by just a few hundred votes.
But the party failed to repeat this success a few months later in the Glenrothes by-election and, later, in Glasgow North East.
Despite its success, the main issue for the SNP goes back to its very origins - it may be the government of Scotland, but it continues to lack the support it needs to stage its planned independence referendum.