Scotland's biggest teaching union has voted by a clear majority to call for a ban on the armed forces targeting recruitment campaigns at schools.
Some claimed the Army was targeting underprivileged teens
The move follows an emotional debate at the EIS annual conference in Perth.
Supporters of the motion claimed the military was tackling a shortage of recruits by targeting impressionable teenagers in deprived areas.
An Army spokesman said they were disappointed and would go into schools when invited by headteachers.
Supporters of the ban claimed the military targeted teenagers with t-shirts, pictures of helicopters and even Christmas cards from the recruiting officers.
Opponents at the conference in Perth said it did not make sense to single out the military when other services such as the fire brigade exposed staff to danger.
An Army spokesman said: "We are obviously disappointed by the way the debate went at the EIS conference.
"We will endeavour to visit school as previously when invited to do so by headteachers."
Delegates were told that one establishment in Glasgow had 14 visits from army recruiters in the past year, while another experienced a 10-fold rise in the number of army visits during the past 12 months.
The motion was put forward by the EIS' Edinburgh Local Association.
EIS general secretary Ronnie Smith said afterwards: "There was evidence that they (the armed forces) were concentrating their efforts on some of the poorest and most disproportionate areas.
"It was felt that there was not a uniform approach."
He added: "We support the concept of schools as places of education, and of career guidance.
"But I think there's a fine line between legitimate career guidance and other tactics which intrude into the life of the school."
South of Scotland SNP MSP Christine Grahame, a former teacher, said she backed the decision.
She said: "It is entirely inappropriate for the armed forces to be undertaking these visits simply because they are facing falling recruitment levels overall combined with increasing levels of desertion and serving troops resigning from the army.
"We owe it our children to offer them more than a potential one way ticket to the bloody mess which has become Iraq and Afghanistan.
"At present, it appears that the armed forces are getting preferential treatment in terms of access to schoolchildren, some as young as 14, at the detriment of other public services and business career opportunities. That cannot be right."