While the children could see each other - and even touch fingers through the mesh - they could not play together at break times, even though most lived in the same communities.
Now, thanks to a new initiative to develop school playgrounds, the fence dividing Loch and St Anthony's primaries in Rutherglen, South Lanarkshire, has been taken down.
As a result, the pupils share playtime in the enlarged outdoor space, allowing both schools to explore themes of anti-sectarianism in a practical way.
Gillian Coulter, quality improvement officer for South Lanarkshire Council, said the project, which had attracted funding of £15,000 from charity Grounds for Learning, has transformed the schools.
"Just taking the fence down had the biggest impact because there is no longer a physical barrier," she said.
"It has been a great success because it has changed the mindset and that has been very positive. Before, the fence marked the two different territories, but now there is no territorialism."
Sheena McNeill, headteacher at Loch Primary, said the schools had always enjoyed a good working relationship, but the playground development had taken it to a new level.
"At first we envisaged timetabling separate days for the schools, but we realised the pupils were enjoying working and playing together," she said.
"It was therefore decided to encourage both staff and pupils to share the area together."
Rita McLaughlin, headteacher of St Anthony's Primary School, said staff were now seeking further opportunities to work together across the curriculum.
"We have been successful in bridging the sectarian gap while at the same time retaining our individual identities," Ms McLaughlin said. The pupils enjoy that they are now having the opportunity to play with their friends both at home and in school."
Heather Gray, from the Grounds for Learning charity, which landscaped the new playground, said the project was chosen because of the potential to break down barriers.
"They knew part of the fence would be removed and we encouraged them to take the whole lot down and create one site with lots of green space," she said.
"Parents, staff and pupils from both schools all came together to discuss the project and it has been hugely positive."
David Scott, campaign director for the anti-sectarian charity Nil By Mouth, described the project as "exceptional" because it was breaking down sectarian barriers at a crucial age.
"Throughout this process both schools have kept their own unique identities, but have also enriched pupils' experiences by learning about others and creating a shared outdoor space," he said.
"The pupils have a big say in what happens and it's great to see how proud they are all of their work. We know from a number of studies that sectarian attitudes and misconceptions about other cultures and religious traditions can be picked up by children by the time they are five years old and this needs to focus our minds on how we help children better understand differences."
Bill Maxwell, chief executive of schools quango Education Scotland, recommended the project to other schools wanting to tackle issues such as sectarianism.
The work of the two schools will be showcased at the Scottish Learning Festival in Glasgow this week.
The event has been given the theme, "Raising the bar in Scotland - transforming lives through learning", and will take place at the SECC in Glasgow on Wednesday and Thursday.
Keynote speakers include Education Secretary Michael Russell, while seminars will be held looking at ways for Scotland to learn from counterparts in Finland and other education systems around the world.
Alastair Seaman, from Grounds for Learning, will lead a session on the South Lanarkshire initiative.