SCOTTISH firms have been warning about the shortage in skilled and qualified staff for years now. Time and again, firms working in oil and gas, the digital sector, research and development, technology and a range of other areas have said they cannot find the qualified staff they need. To make matters worse, many employers are also rightly concerned that Brexit is only going to make the skills gap bigger.

Sadly, there are no immediate signs of improvement, with a new survey by the education group Pearson UK and the Confederation of British Industry revealing that two-thirds of Scottish firms are worried that they will be unable to recruit sufficiently skilled employees over the next few years.

Pearson, not unexpectedly, believes the answer lies in education. There is a need, it says, for the higher education sector and businesses to work more closely together. They also believe more degrees should be designed and delivered with the world of work in mind.

There is some logic in this approach, although there is a danger too in higher education becoming a factory for business, churning out graduates for specific jobs rather than giving them a well-rounded education. And in many ways, the problem actually goes further back to schools where the stem subjects that are critical to Scotland’s economic prospects – science, technology, engineering and maths – are not being taught as well or as broadly as they should. According to the most recent analysis of figures from the Programme for International Student Assessment (Pisa), Scotland is failing its brightest pupils with maths students performing worse than in most other industrialised nations. Action is needed to improve our performance.

Where we are doing well is on apprenticeships, with Scotland on track to achieve its target of 30,000 modern apprenticeship starts by 2020. There are also many conspicuous cases of Scottish companies, such as Dell, running programmes in schools aimed at getting children interested into science and technology.

However, the skills shortage is unlikely to be narrowed while Brexit still looms. Many of the Scottish companies concerned about being able to recruit the people they need rely on EU migrants and, as part of the Brexit deal, a way must be found to allow EU workers to take up jobs in Scotland even if the rest of the UK is clamping down on migration. Anything else means the skills gap in Scotland will only get worse.

The good news is that the skills shortage is being created partly by ambitious, innovative Scottish companies that are aiming high. However, the success of such firms will only continue if the skills shortage is tackled at its roots. The education sector, government and industry must work more closely in the areas that need improvement: the teaching of stem subjects in schools, practical work placements, and careers advice. And Scotland must have an immigration policy that meets its needs.