Image caption Some pupils gathered at Airdrie Academy to receive their results

The pass rate for Higher exams has dipped slightly but the total number of passes remained above 150,000 for a third successive year.

Almost 137,000 candidates have received full results of their Nationals, Highers and Advanced Highers.

The pass rate at National 4 was 92.8% although there was a significant drop in entries.

More than a third of students opted to receive the news by text or email with the remainder being notified by post.

The Scottish Qualifications Authority (SQA) said the results, which overall were broadly in line with 2016, were evidence of a stable system.

Scottish exam results 2017 136,889 candidates 150,010 Higher passes 77% Higher pass rate (A-C)

77.2% Higher pass rate last year

116,032 National 4 entries

122,961 National 4 entries last year

An analysis of the marks required for a C pass at Higher suggests there are no subjects where the pass mark has had to be raised or lowered dramatically.

There was no repeat of the situation two years ago, when the Higher Maths pass mark was cut to 35% because it was much harder than usual.

Figures from the SQA revealed:

The number of passes at Higher level was 150,010, the third year in a row it has topped 150,000.

The number of entries for Highers dropped almost 3,000 on last year to 194,813 but remains at a high level historically.

The proportion of A-C Higher passes also fell very slightly from 77.2% last year to 77%.

The number of National 4 entries fell significantly to 116,000 compared to 123,000 last year.

The number taking National 4 English fell by almost 2,000. Entries for the more advanced National 5 English only increased by 400.

The number of Advanced Higher entries went up from 23,795 last year to 24,112 this year.

Education Secretary John Swinney congratulated students and teachers for their "hard work and effort".

On a visit to Bannerman High School in Baillieston, Glasgow, Mr Swinney said: "The whole country should rightly be proud of the excellence and achievement in Scottish education demonstrated by these results.

"We expect to see small variations in pass rates year-on-year, which demonstrate the high standards, strength and integrity of our national qualifications. This is of paramount importance.

"The much greater range of qualifications and skills-based awards demonstrates Curriculum for Excellence is successfully meeting the needs of young people and giving them the best chance of success in further learning, life and work. It is the right reform for Scottish education.

"The further steps we have set out to close the attainment gap and raise standards for all will build on these solid foundations."

Analysis by Jamie McIvor, BBC Scotland education correspondent

Image copyright PA

Exam passes are high by historic standards, more youngsters are staying on at school and going to college or university.

Is this a good thing in itself? Or is the education system simply having to adapt to the fact that in the modern world there are fewer good jobs for young people, and that unskilled jobs are disappearing?

Read more from Jamie here.

Dr Janet Brown, SQA's chief executive and Scotland's chief examining officer, also congratulated students on their hard work and dedication.

"Whichever route is taken from here, whether that be the world of work, training or education, they can take immense pride in their achievements," she said.

"Recognition and praise should also go to the teachers, lecturers, parents and carers who have supported their young people in their accomplishments."

Larry Flanagan, general secretary of Scotland's largest teaching union, the EIS, said the results came against a background of increasing workload for teachers.

He said: "Scotland's teachers have again gone that extra mile to support their students' learning, despite the enormous workload pressures faced by the profession.

"However, the EIS expects to see a significant reduction in workload over the forthcoming session and will hold both the Scottish government and the SQA to account on delivering the promised reduction in the assessment burden on both staff and pupils. Frankly, the goodwill of teachers has run out."

Royal Mail said it had planning teams working for months to make sure the delivery of results went smoothly.

A free helpline is available on 0808 100 8000 for anyone seeking practical advice regarding their results.

A spokeswoman for Colleges Scotland said students should not be discouraged, even if they failed to perform as well as they had hoped.

"Some may not have received the results they were hoping for and it's important to know there are a myriad of opportunities available should they look to a college route to develop their skills and progress towards employment or higher education," she said.

Scottish Labour leader Kezia Dugdale wished pupils good luck, and urged anyone worried about their results to call the helpline.

Image caption Skills Development Scotland staff are ready to advise on exam results

Operated by Skills Development Scotland, the helpline will be open from 08:00 until 20:00 on Tuesday and Wednesday and between 09:00 and 17:00 until 16 August.

The group's acting director of operations James Russell said: "Our message for those young people and their parents and carers as the results arrive is not to panic.

"Everything might seem overwhelming at that point. Our experienced advisers are there to help and have information on all the options and opportunities young people can consider."