It was once described as "a route of many roads leading from nowhere to nothing", yet the popularity of philosophy in Scottish schools has seen a dramatic upturn in the past five years. The number of pupils studying the subject of thought has risen by more than 41%.

According to official figures, there were just 755 pupils studying philosophy at Intermediate 2, Higher and Advanced Higher in 2003, but this year the figure rose to 1067.

The increase in numbers has been welcomed by those who believe philosophy should play a central role in what is taught in schools.

Jim Petherick, national convener of the Humanist Society Scotland, said the increase in pupils studying philosophy was "brilliant" and should be encouraged.

"Anything that teaches children about an awareness of their surroundings and their fellows has to be a first class idea," he said. "The basic ethical values that we try to instill in our children and grandchildren are completely contained in simple philosophical arguments. We hope this will spread."

However, the increasing popularity of the subject has created an unforeseen problem. Because there is currently no secondary teaching certificates for philosophy as a specialist subject, some schools are struggling to cope with the new found demand. The situation has prompted St Andrews University to offer a new online course for teachers involving elements of philosophy such as ethical issues, reasoning and knowledge, mind and reality.

The course has been designed by Dr Lisa Jones, a teaching fellow for the university's department of philosophy, after a request from a teacher at a local secondary school.

"Interest in the subject in this country is certainly growing. Philosophy teaches a range of transferable skills in critical and analytical thinking and we are finding a great deal of enthusiasm in both teachers and students," she said.

"We decided to develop the online course because we found that teachers were still very apprehensive about teaching the subject at Higher level.

"We were already engaging with teachers from all over the country and have not just the academic knowledge but the technology in place for online learning. By hosting the programme online, teachers working full-time all over the country can take part."

From early next year, teachers will be given the opportunity to study four modules at St Andrews. Learning entirely from internet-based resources, including online lectures and live events, subjects will include the study of a variety of thinkers from Descartes in the middle of the 17th century to Kant at the end of the 18th century.

Last year it emerged that teaching primary school children philosophy and the thinking skills of Socrates resulted in a lasting gain in intelligence.

Clackmannanshire Council in Central Scotland pioneered the teaching of philosophical enquiry in primary schools, when it introduced the subject in some of its most run-down areas six years ago.

An initial study carried out in 2003-04 showed that children aged five to 11 who were taught so-called "philosophical enquiry" showed intelligence gains of more than seven IQ points.

Another study showed that the gains were maintained years later, even in children who no longer had access to the programme.