Members of key Scottish professions can no longer afford to send their children to fee-paying schools, new research has revealed.

Teachers, engineers, and police officers have been priced out of private education by a 40% rise in fees in just five years, according to the Bank of Scotland.

It now costs an average of £8247 every year to educate a child privately in Scotland compared with £6039 in 2002, and fees are now rising at twice the rate of inflation. Only prices for houses are growing faster.

Martin Ellis, chief economist at the Bank of Scotland, said: "Private school fees in Scotland have risen by significantly more than average earnings over the past five years, making it increasingly difficult for many parents to send their children to private schools.

"The average earner in a number of occupations, including engineers, journalists and teachers, can no longer afford private education for their offspring.

"With school fees continuing to rise by more than inflation and private education proving increasingly popular, parents need to plan their finances as early as possible if they want to afford private schooling for their children."

Yet the relentless rise in fees outlined by Mr Ellis and his colleagues has done nothing to dent rolls at Scotland's 100 independent schools.

The Scottish Council for Independent Schools (SCIS) said numbers, despite a fall in the overall school-age population, were actually growing.

There were 31,416 children at independent schools in 2006 compared with 31,256 in 2005 and 31,238 in 2004. That means that the proportion of children going private has risen in recent years.

Judith Sischy, the SCIS's director, said she knew plenty of engineers, teachers and other professionals who found a way to pay fees.

She said: "We know many of our parents don't find it easy. Fees are being paid from taxed income. Some people have to make sacrifices. You can't have everything. You look at the cost of having a holiday or doing up the house and see that school fees must be the priority.

"We know that parents value the education that their children receive and that meeting the cost can involve making difficult decisions. However, it is one of the most important investments that parents can make for their children.

"We still see parents in occupations who earn less than the ones the Bank of Scotland has mentioned."

Parents are as keen on private schools as ever - nearly one in 20 children in Scotland attends one, attracted by the chance of a head start in everything from Chinese - compulsory at Merchiston Castle in Edinburgh - to PE.

Mr Ellis said average school fees were now only in the reach of 13 occupations, down from 23 in 2002. Affordability was measured at a quarter of average earnings for the profession.

So a scientist, earning an average of £37,290 a year, would have to give up an unaffordable 26% of his or her income to put one child through school for a year. But an architect, with an average income £42,224, would only be parting with a bearable 23% of their earnings.

The professions that could afford fees were company directors, bank managers, accountants, production managers, IT professionals, doctors, pilots, senior police officers, lawyers, architects and customer care managers.

However, there are ways of paying less. Independent schools offer various bursaries and discounts, perhaps for talented children from poorer backgrounds or for those from large families.

The High School of Dundee recently retained its charitable status after the charity regulator, Jane Ryder, ruled that its fees were not overly restrictive and that it found ways to help those in need.