Young people should be made to stay in education until they are 18, a think tank has said.

The Institute for Public Policy Research (IPPR) Scotland made the call as it published a new report on the impact automation and ageing could have on the country.

In the report, the organisation said almost half (46%) of all jobs in Scotland have the potential to be changed in the coming years as a result of automation.

At the same time the increasing number of elderly people means there will need to be "significant increases in productivity" from the working population.

IPPR Scotland director Russell Gunson said: "Aside from Brexit, preparing for automation and ageing should be the top priority for Scotland."

As part of what it termed a "revolution in lifelong learning", the think tank called for the existing school leaving age to be replaced with "a new skills participation age of 18".

It addition it recommended everyone under the age of 21 should be involved in learning new skills by 2025, and the Scottish Government introduce a new target of having 100,000 workers over the age of 25 involved in the skills system by then.

Meanwhile it suggested up to 30,000 workers a year could benefit from an "enhanced Individual Training Account", providing them with £1000 a year for training and skills.

The additional investment in skills and training needed to prepare for automation could reach £250m a year by 2025 - which the report said should be split between the public and private sectors.

An IPPR Scotland spokesman said: "These recommendations would ensure Scotland was among the most prepared countries in the world in getting ready to take the opportunities brought by automation, ageing and the economic change we face over the coming years."

In Scotland 14.9% of workers aged 16 to 24 are in "insecure employment" - which includes temporary jobs and zero hours contracts - as are 9% of those aged over 25.

"For too many, low-paid work is a trap that leads to low-paid careers," IPPR Scotland said in the report.

"If the challenge following the recession of the 1990s was to get people back into work, the challenge we face now is in getting people into higher-quality work."

Mr Gunson said: "If the last 30 years have been, rightly, about expanding higher education to help Scotland to transition to a knowledge-led economy, then the next 30 years need to be about expanding lifelong learning to take the opportunities of automation and ageing.

"From our research, we believe that investment in education and training, and lifelong learning in particular, will be the single most important way to get Scotland ready to take the advantages coming our way through technological change."

The Scottish Government said it will consider the recommendations fully.

A spokesman said: "Ensuring Scotland has a skilled and productive workforce, both now and in future, is central to our ambitions for our labour market and economy.

"The IPPR's report underlines the importance of Scotland's skills system meeting our future skills needs, given the importance of issues such as changing workforce demographics, the potential impact of technological change and the great uncertainty brought about by Brexit."