Mr Wilson has rejected pleas for a voluntary system of training and opted for a mandatory Scottish Qualification for Headship, to be launched at the start of the 1999 session. His announcement follows a three-month consultation period.
He said: "The strength of a school depends on the quality of its leadership and it is important that we should have proper qualifications and training for the post of headteacher.
"The majority of those who responded to our consultation paper positively welcomed the idea of a qualification on the grounds that headteachers should be properly prepared prior to appointment. Respondents emphasised that the qualification should be practically based on work in schools."
Mr Wilson said that he hopes to proceed "on the basis of consultation and co-operation, working together with those organisations and individuals who share the Government's commitment to raising standards, quality and levels of attainment".
The qualifications will be at three levels, certificate, diploma and master's, and will be developed by a steering group including local authorities, the General Teaching Council and higher education institutions. Heads will have to reach diploma level before they can take over a school.
Rena Mitchell, president of the primary Association of Head Teachers in Scotland, welcomed the move to compulsory training. She said: "The job has changed so much and people need to be better prepared. We have learnt on the job but it has definitely changed since the seventies. I am not sure they will get better headteachers but they will get better prepared headteachers. "
Mrs Mitchell believed it could be a good career move for aspiring heads to sit the new structure of qualifications, "so long as they do not lose touch with the children and curriculum".
But she warned: "There is no point in someone who has not been in school for 15 years delivering a course on management."
The Scottish Office is to run three one-day conferences on the new qualifications.
Jim McNair, secretary of the secondary Headteachers' Association of Scotland, expressed "some reservations" about moving too quickly to compulsory training but welcomed the broad thrust. It would be important not to forget practical training in school, Mr McNair said.