Any man who breathes with lungs that are not his own has to be one of life's survivors. The Scottish Education Minister, Sam Galbraith, is learning that political survival is even more difficult.

The exam results fiasco that has blighted the lives and prospects of the class of 2000 has put the career of the brain surgeon turned politician on the critical list. The prognosis is that he will have departed the Scottish government by the end of the year.

The bungling that resulted in thousands of wrong, delayed and mislaid Highers and Standard Grade results has become what is described as "Scotland's most damaging political crisis since devolution". Galbraith is paying the price for his blustering in the face of the anguish of betrayed teenagers and the outrage of their parents and teachers.

It seems a harsh retribution for a man who has already suffered so much. Galbraith was diagnosed with a potentially fatal form of pulmonary fibrosis and had to have one of the earliest lung transplants in 1990. It was an outstanding success, returning him to life as a father of two and an increasingly successful politician. His manner, however, still smacks of the autocratic consultant dealing in life and death, and his curmudgeonly, sometimes openly contemptuous, attitude has led to complaints to the Presiding Officer.

For some time, he combined medicine and politics: while on political business, he received calls from operating theatres for advice on how to proceed when a patient's cranium has been opened and complications discovered.

A few months ago, it was Galbraith who spotted Donald Dewar's heart condition, which led to the valve-replacement operation from which the First Minister has just returned. This may explain why Dewar has remained so doggedly loyal to his beleaguered Education Minister.

Galbraith was accused of being patronising when he told "mums and dads" in the Section 28 furore: "Trust me, I'm a dad . . ." They pointed out that he had sent his two daughters to Jordanhill School in Glasgow, the only grant-maintained school in Scotland, exempt from local authority control.

He tried a similar ploy in the exams crisis, saying: "I know how you feel, I was a student myself . . ." It had a hollow ring as Galbraith gave categoric assurances that were not delivered. Among the thousands of flawed results were those of a Russian boy, now resident in the isles, who failed to get a pass mark in his native language. A recount has given him his Higher, but other pupils who had A grades in prelims were failed completely.

There are 147,000 appeals; the Scottish Qualifications Authority says that the students who have made them may have to wait until Christmas to know their fate.

Meanwhile, despite promises that no deserving case would lose a university or college place, English universities are asking students: how can we be sure your results are correct?

It is hard to think of a more damaging betrayal by government and officialdom - or how it could have been made worse. But it was. In a statement to the Scottish Parliament, Galbraith tried to take refuge in the SQA's status as an arm's length non- governmental body. He gave the soundbite that will haunt him: "I had abso- lutely no power to instruct the SQA to do anything."

As far back as March, teachers from every part of Scotland were warning about an impending crisis. HMIs were being given the same message, only more forcibly, when they visited schools. The minister's excuse for his non-intervention was lame: "Again and again, I and my officials raised specific concerns. Again and again, we were offered reassurances that - at the end of the day - were worthless."

The day after the statement, the SNP leader, Alex Salmond, accused Galbraith of "dissembling" - parliamentary language for telling porkies. He quoted the Education (Scotland) Act 1996, which laid down that the minister had power to give direction "and it shall be the duty of the SQA to comply with such directions".

Galbraith looked stricken but, more importantly, the Labour backbenchers behind him looked aghast. Dewar summoned up what he could remember of his legal training to attempt a nit-picking defence, but the "Save Sam" strategy had effectively collapsed and "if he goes" became "when he goes".

It may be no consolation to the young people most directly affected, but some good may be salvaged from the wreckage. Labour has not started gathering the tinder for the "bonfire of the quangos" that it promised at the 1997 general election, but now the overhaul of the status and power of the SQA will lead to calls for a wider-ranging cull. Parliamentary committees could gain new authority; and there will be a more questioning attitude to the "we know best" culture of those who are supposedly public servants.

Indeed, already, the Presiding Officer, Sir David Steel, has overridden a government attempt, with Lib-Dem connivance, to gag the parliament. Although a full-scale debate was denied and Tom McCabe, the Minister for Parliament, made a thuggish threat to curtail opposition business, Steel allowed one and a half hours of questions and answers on the subject: this amounted to the debate that the fixers had tried to avoid.

What has been bad for Scottish education may, in the end, be good for Scottish democracy. As for Galbraith's political epitaph, it may have been written by Jennifer Dunlop, a sixth-year Ayrshire schoolgirl who, through no fault of her own, finds herself in educational limbo. She spelt it out with the cruel simplicity of the young: "I would like to see him pay for what he has done to the future prospects of my generation."