RYAN Gilmour knew he wanted to be a teacher for the rest of his working life when he stood up in front of a class for the first time.

"I felt it straight away. I've wanted to be a teacher since I was at school, but as soon as I had that connection with pupils; that spark where I realised they understood what I was telling them and were responding; that's when I thought: 'I want more of this'," he said.

Currently in his probationary year teaching physical education at a secondary school in the Ayrshire town of Stevenston, the 27-year-old from Largs can't understand why more people don't consider a career in the profession.

"Some of my friends who studied to the same level as me earn bigger salaries, but this job is about a lot more than the money. The whole idea of being able to change someone's outlook on life or change someone's path in a positive way is incredible.

"A good teacher has the potential to have a positive influence on a pupil for the rest of their life. Even if that only ever happens once then that is remarkable and the thought of having that impact is what drew me in."

Sixty-year-old Glasgow-born Aileen Barrie, who lives in Airdrie, voices the same passion for teaching despite more than half a lifetime in the classroom.

Now retired, the geography teacher said: "I loved teaching. I loved being in the class with the children. When the door was shut and I was in with the kids that was the bit of the job I always loved."

But her experiences in North Lanarkshire also left her disillusioned with the way schools were being run, with increasing pressures placed on teachers, mounting paperwork, cuts to resources and dwindling pay.

"It was things outwith the classroom that got to me eventually and I took early retirement. The level of assessment has become ridiculous with folder upon folder for each pupil.

"I felt isolated because of the constant cuts to support staff at a time when more pupils were coming into the classroom with increasing levels of difficulties.

"Overall, the pressure and stress definitely got worse. I always brought work home and when you enter teaching you expect that, but latterly it was well above what was acceptable."

The "last straw" for Mrs Barrie was a request by her headteacher that she teach modern studies and history as well as geography to first year pupils.

"It was a financial move because it was easier to timetable, but I have got a science degree with geography and I haven't done any history or modern studies since I was at school," she said.

"What does that tell us about the level of esteem we hold these subjects and these pupils in - that anybody can teach them without any qualifications? It really angered me."

Mrs Barrie is not alone in her concerns. A disturbing survey published earlier this year suggested a majority of Scottish teachers would not recommend the job to others.

The poll by the Educational Institute of Scotland (EIS) teaching union found 58 per cent of respondents were unlikely to endorse the career to others while only two per cent would be "very likely" to do so.

The greatest concern was spiralling workload, while changes to the curriculum and qualifications, teacher shortages and stagnant pay were also highlighted as key areas of dissatisfaction.

Like Mrs Barrie, teachers also raised concerns about the lack of support staff at a time when inclusion policies have led to an increase in pupils with more challenging behaviours.

This apparently widespread disenchantment with teaching appears to be having an impact on recruitment and retention.

Just over a decade ago there were more than 52,000 teachers in Scotland, but by 2014 this had fallen to just over 48,000. While numbers have improved since then progress has been marginal.

While teacher numbers will increase or decrease over time to reflect fluctuations in pupil numbers, the difficulties schools face in filling vacancies is a key indication of the popularity of teaching.

This summer, just weeks before the start of the new school year, there were 730 unfilled vacancies across 27 of Scotland’s 32 council areas.

Many of the local authorities most affected serve rural areas including Aberdeen, Aberdeenshire, Moray, the Highlands and the Western Isles.

There have also been shortages of specialist teachers in key subjects such as mathematics, physics and computing. The Scottish Government has responded by increasing the number of teacher training places available, but some of the targets in shortage subjects have not been met.

In addition, new figures revealed by The Herald show more than a thousand teachers under the age of 40 have left the profession in the past two years, with teaching watchdogs highlighting lucrative offers overseas as well as pressures in Scottish classrooms.

At a time when teachers are moving towards strike action over the latest impasse in salary levels, Larry Flanagan, general secretary of the EIS, argues the issue of pay is critical in restoring wider respect for the profession with a "boom and bust" approach in recent decades the underlying problem.

Teachers’ pay has decreased significantly since the McCrone Agreement of 2001, which followed an independent inquiry on pay and conditions. A recent international report also concluded the pay of Scottish teachers was relatively low when compared to other graduate professions.

Mr Flanagan said: "Coupled with the country’s continuing slide down international comparisons on pay, Scotland’s teachers have endured a real-terms pay cut over the past decade.

"This has created a situation where teaching is no longer a desirable career for many graduates, with serious implications for teacher recruitment and retention and for education provision in many parts of the country."

Seamus Searson, general secretary of the Scottish Secondary Teachers' Association, agrees pay is critical, but believes a wider review of the expectations on teachers is just as important.

"What is expected of teachers now is becoming unmanageable. There are no curriculum leaders any more and declining support staff so teachers are on their own with responsibility for all sorts of extra duties. Pay is a big issue, but the workload is the biggest problem."

The Scottish Government argues it is working hard to make teaching as attractive and accessible as possible and that recent figures show the tide is finally turning.

John Swinney, the Education Secretary, said: "We know there are challenges to overcome in teacher recruitment in Scotland, but we are facing these head on and the steps we are taking are working.

"Teacher numbers have increased for the second year in a row and there are now more primary and secondary teachers than at any time since 2014 and the ratio of pupils to teachers is at its lowest since 2013, this is welcome progress."

But are there other factors at play? The issue of teacher shortages is not one that just affects Scotland. Some 40,000 teachers in England quit the profession in 2016 representing about nine per cent of the workforce.

Ken Muir, chief executive of the General Teaching Council for Scotland, argues wider societal factors are in part responsible for the current difficulties around teacher recruitment.

Teaching, particularly in the primary sector, has always been heavily dominated by females, but in recent decades opportunities for women in other professions have increased substantially.

"One of the good things about Scottish society is that we have opened up more opportunities for women to embark on a much wider range of careers than was every the case before and teaching, because of its dominance of females, suffers as a result of that," said Mr Muir.

Mr Muir also believes new post-Millennial "iPad generation" have a different attitude towards their careers than was the case in the past.

"We are seeing youngsters who have been exposed to a different type of background who are much more inclined to try something out and, if it doesn't work, then they press the reset button and try something else," he said.

"That kind of mentality is something we are seeing much more of in teaching and it is one of the reasons why we cannot retain some of the younger teachers.

"The first couple of years are the most difficult and if you are one of these Millennials who is used to hitting the reset button when they are playing computer games then they take that kind of thinking into how they see their career and look for something else."

There is also a fear that intense political scrutiny on education with rival parties seeking to undermine the government's credibility on its self-styled "defining mission" is also fuelling negativity, which is then mirrored in the media.

Brian Boyd, emeritus professor of education at Strathclyde University, believes there is a responsibility on politicians and journalists to think carefully about whether the narrative being created around education reflects current classroom experience. But he also believes teachers have a responsibility to talk up the job.

"There is so much negativity around schooling from political parties scoring points and that gets through to young people and they don't see it as a job for them. It seems to me we have to change that and at least sell teaching as a worthwhile profession with a high intellectual content.

"There is something in the psyche of teachers that makes them self-deprecating and they tend to talk teaching down to others and yet these are often teachers who love the job and have always been very enthusiastic about it."

Probationer, Nicola Day, 27, who is currently teaching in a primary school in Fife, can't think of a better career than teaching and is happy to talk it up, but she also wonders whether ministers are genuinely listening to the concerns of the profession.

"Before becoming a teacher you have to make sure you really want to do it because you have to put your whole self into it. If you don't care with every fibre of your being then you are not going to be able to do it.

"That makes it a very tough job and the more difficult teaching is made because of curriculum changes or more paperwork or lower pay then the harder it will be to attract people. I think politicians need to listen to teachers more because so many voices in the profession are in agreement that these are the issues that need to be tackled."