Scotland needs to do more to address the risk of robots replacing humans in the workplace, trade unions have warned.

The unions claim urgent action needs to be taken to ensure workers are not left unemployed as a result of widespread advances in automation.

The warnings came as a report revealed the UK is lagging behind other countries when it comes to preparing for the changes - with education and training the main areas of concern.

The global Automation Readiness Index (ARI), published by The Economist, lists the UK as number 8 in the world in preparing for the expected rise in robots, with countries such as South Korea, Germany and Singapore topping the list.

HERALD VIEW: We need to be prepared for the rise of the robots

Pat Rafferty, Scottish Secretary of trade union Unite, warned the report should "set alarm bells ringing" for Scots.

He said: "The report’s analysis that we are behind in the education of young people to enable them to benefit from automation is a warning.

"So too is the fact that the report finds there is a clear lack of adequate training in innovation in the workplace, and the policies to make that happen."

Mr Rafferty claimed trade unions believe there are positive gains to be made from automation, but warned against a "nightmare scenario of machines replacing workers and cataclysmic numbers thrown out of work".

He added: "We need to learn lessons quickly and if the Economist report is to be seriously considered we need to face up to the fact that currently the UK is lagging behind dangerously."

Unison argued that while the impact of new technology can sometimes be exaggerated by experts, strategies on automation need to be put in place now to ensure workers can transition into other roles.

Dave Watson, Unison head of public affairs, said education and training were key, adding: "Proper planning and strategy is needed now, not further down the line.

"We should be anticipating where we are likely to see job losses and putting measures in place to ensure that we have a just transition to new types of jobs.

"Industry will not do this, it's very hard to get companies to plan that far in advance, so government needs to step up to the plate."

READ MORE: One in three workers believe their job will be automated in next decade

The ARI report, which came as further research indicated two-thirds of Scots fear the impact of robots, found that UK primary schools have not focused enough on developing critical thinking and problem solving skills.

It also states that there is a lack of workplace training programmes, as well as a need for more support for workers who want to learn new, in-demand skills.

Professor Rose Luckin, chair of Learner Centred Design, who helped to produce the index, said: "The UK has a real opportunity to take a world-leading role in creating and successfully deploying a new generation of smarter digital learning tools across education and training, that will equip students and re-equip workers of all ages with the skills they will need to thrive in the new economy.

"However, without a clear policy agenda, including the assessment and inspection services, targeted funding, and the engagement of educators (as well as technologists), this opportunity will be lost and the UK risks being left behind."

A recent report by the Scottish Government revealed a number of steps are already being taken in Scotland to address automation.

These include further investment in digital skills, the creation of a Just Transition Commission, and a plan to provide direct support for additional business research and development.

However, the report also raised issues with the UK Government's approach to the labour market and called for devolution of employment law so that Scotland can create its own policies.

HERALD VIEW: We need to be prepared for the rise of the robots

First Minister Nicola Sturgeon claimed the government was working with the Scottish Trades Union Congress "to ensure automation and digitisation have positive outcomes for all of Scotland’s people".

She said the government recognises the genuine fears workers may have over the impact of new technology, but added that "Scottish Government approaches to skills development and fair work can help meet the challenges of technological change".