The Scottish economy has narrowly avoided recession, with new statistics showing modest but measurable growth in the second quarter of the year.
Scotland's economy is at the mercy of global trends
Scotland's gross domestic product (GDP) rose by 0.4% in the three months to end-June, after having shrunk slightly in the previous quarter.
Two successive quarters of contraction is the technical definition of a recession, a situation that would have been embarrassing for the five-year-old devolved government.
Over the past few years, its economy has sharply underperformed the UK average, leading to accusations of mismanagement and complaints from the business community.
The news that Scotland has avoided recession has come as a surprise to pundits, almost all of whom were predicting a second quarter of decline.
But overall UK GDP was revised sharply upwards in September, an indication that the result could be more positive than many had feared.
There is nonetheless considerable gloom over Scotland's economic position, since output has been hit hard by the underperformance of the hi-tech sector - the source of the bulk of inward investment during the 1990s, and a major employer in the industrial heartland.
Over the past decade, Scottish Enterprise, the economic development agency, has been highly successful at attracting foreign manufacturers of computers, mobile phones and hi-tech components.
At one point during the 1990s, Scotland accounted for 20% of all investment into the UK.
But in the past couple of years, many multinational firms have shifted production to cheaper markets.
Hopes of a revival
The Scottish Executive is promoting various schemes to revive the economy, notably "Smart, Successful Scotland" - a scheme to boost the country's quality of life and potential to foster commercial innovation.
But many business groups complain that it is paying insufficient attention to improving the basic environment for business, and allege that it has raised the costs of doing business to uneconomic levels.
The Fraser of Allander Institute at Strathclyde University, the country's most influential economic think-tank, now forecasts that the Scottish economy will grow by about 1% this year.
And Scotland's future growth is highly dependent on developments outside the country, notably global trends in technology and financial services.