Almost 3,000 racist incidents have been reported in Scotland's schools over the past five years.
Freedom of information requests to councils found almost 2,000 incidents of racism in primary schools and 1,000 more in secondary schools since 2011.
The Scottish government said the number of incidents fell in recent years.
But the Scottish Liberal Democrats, who uncovered the figures, voiced fears that the numbers could rise again following the Brexit vote.
Figures were provided by 26 out of 32 local authorities, although some large councils including Glasgow City Council and Aberdeen City Council were not among them. Some councils did not supply data for every year, meaning the total figure will be higher.
A Scottish government spokeswoman underlined that the figures had been falling in recent years, saying it was "very welcome" that the number of recorded racist incidents had fallen almost by half in primary schools and by a quarter in secondary schools over the last two years.
She added: "Nevertheless, we still need to be vigilant in challenging any racist, homophobic and abusive behaviour in our schools. Bullying of any form is entirely unacceptable."
Lib Dem education spokesman Tavish Scott said it was important to make sure there was not a "spike" in racist incidents following the result of the EU referendum.
He said: "Reports suggest we have seen a surge in racist incidents around the United Kingdom after the Brexit vote and the last thing we need to see is that replicated in our schools when they return from the holidays.
"Ministers and local authorities need to work together to reinforce efforts to ensure every child feels welcome and secure when they return to school next month.
"Now more than ever there needs to be a strong emphasis on early intervention."