School children are eating chicken produced 6,000 miles away in Thailand, a BBC investigation has found.
Scottish government ministers have repeatedly called for supermarkets and shops to buy local.
But the BBC found Scottish councils are spending millions importing food which could be sourced in Scotland - Glasgow alone spends £1.3m a year on imports.
Procurement body Scotland Excel said it had in the past been "difficult to meet poultry demand" from within Scotland.
The BBC sent Freedom of Information requests to all 32 Scottish local authorities.
It got responses from 28. Glasgow did not produce figures breaking down which products they bought.
Last year the 28 councils spent:
- £1.3m on chicken products from Thailand
- More than £125,000 on carrots from Belgium
- £125,000 on mash potato products from France
- Almost £12,000 on raspberries from Serbia.
North Lanarkshire spent one of the highest amounts on foreign products which could be sourced locally - buying more than £200,000 of chicken from Thailand. Aberdeenshire spent about £100,000.
Councils such as Dumfries and Galloway and East Ayrshire did not buy any chicken products from Thailand.
The revelations follow repeated calls from ministers for Scotland to buy local produce.
In 2009, the Scottish government published "Recipe for Success" - Scotland's National Food and Drink Policy.
It called for "the adoption of sustainable food procurement as a corporate objective for all public sector organisations".
Four years later, then Rural Affairs Secretary Richard Lochhead called for supermarkets, catering companies and fast food chains to source their chicken locally.
Local authorities source much of their red meat, dairy and eggs from suppliers within Scotland and the UK.
In the past year, the same 28 local authorities spent more than £7m on dairy from within the UK.
Some chicken products were sourced from within the UK but the majority was brought in from abroad.
Other items including turkey, beef and corned beef were imported from Brazil in the past 12 months.
And a number of processed items - including honey roast ham - are cited as coming from the UK, Belgium, France, Denmark, Germany, the Netherlands, Romania, Hungary and a number of other countries.
Critics have questioned the impact on the environment and the harm to local farmers.
NFU Scotland's supply chain policy manager John Armour said: "It is clear that more can and should be done by local authorities to source food produced from Scotland."
Conservative MSP Brian Whittle spent months pursuing answers on where Scotland's food comes from.
He originally began asking questions about food procurement in the Scottish Parliament and then pursued information under the Freedom of Information Act.
He said: "If you look at things like importing flash-dried mashed potatoes, importing chicken from Thailand, over a million pounds worth of chicken comes from Thailand - and actually says in brackets - 50% chicken - the quality of the food we are serving to patients in hospitals and to our kids in schools is not the highest quality possible.
"When we look at some of the councils, for example East Ayrshire council - they can tell you which farm the eggs come from - so it is perfectly possible to procure locally and it must be good for Scotland as a whole."
Speaking to the BBC, Rural Economy Secretary Fergus Ewing said: "I think we are doing quite well but we could do better.
"Almost half of the £150m spent on procuring food in the public sector is sourced locally. 48% is Scottish food."
Mr Ewing said the amount sourced in Scotland had increased by 41% over the past seven years since Recipe for Success.
He said: "I'm working with the farmers, the retailers and the wholesalers."
He said he would not order businesses such as wholesalers to buy Scottish produce.
Mr Ewing said: "We want to win on merit, on value for money and on price in Scotland, and that's increasingly what we are doing."
Scotland Excel is the national centre of procurement for Scottish councils.
A spokesman said: "All poultry supplied to Scottish schools is of the highest possible standard and meets the required national specification to develop and plan menus that meet nutritional standards.
"Historically, it has been difficult to meet poultry demand requirements based on the supply within Scotland. We have worked hard to source UK produce and in the last year we have seen an increase in these products."
A spokeswoman for North Lanarkshire Council said: "Like most councils, all our food is sourced through national procurement frameworks through Scotland Excel. The only exception is fruit and vegetables which we source, with another local authority through council procurement processes.
"North Lanarkshire is the fourth largest Scottish local authority with more than 150 schools and 49,000 pupils. Consultation with pupils on menu choices demonstrates that chicken dishes are very popular.
"Chicken purchased through the Scotland Excel Framework agreement complies with all relevant legislation, operates to full traceability throughout the supply chain and is produced to high standards of quality."
On Thursday BBC Scotland will be looking at the amount of money spent on food in Scotland's hospitals.