Over the past few months, an intriguing dispute has been going on in Lancashire between a secondary school and an adjoining leisure centre.
For years the two have shared a site, and pupils from all the local schools have benefited from the council-owned sports facilities when the public weren't using them. But recently the school raised an objection: how could it fulfil its legal duty to protect pupils from danger when the public had unsupervised access to its grounds?
It served notice that it wished to cancel the dual-use agreement for the facilities, raising the possibility that the sports centre would have to close.
Local people were immediately up in arms and voiced their fury at a public meeting attended by hundreds.
Now it seems a solution has been found, though only at great cost to the local authority.
In future, leisure centre users will have their own car park and entrance, and will be separated from the school's pupils by heavy-duty fencing.
Anyone involved in education would be bound to sympathise with the school. The consequences, should a pupil have been molested during the school day, could have been severe.
There could have been legal action by parents; potentially even a public outcry over how a child could have been left exposed in this way.
However, the spat raises questions about the management of risk, particularly in these days of extended schools.
Just recently, Ofsted produced a guide to good practice which cited adult literacy classes, allotment clubs and playgroups as positive initiatives that could help to put pupils in touch with their local communities.
So, on the one hand such schemes are thought to be a useful means of bringing people together, while on the other they are perceived as a potential source of danger. What, then, are the risks?
There seems to be a perception that the world is becoming a more frightening place.
The chair of governors at the Lancashire school argued that its 16-year-old agreement had become out of date in terms of child protection requirements.
Those requirements have certainly become more stringent - but why? Are children really more at risk from strangers now than they were in 1993?
The evidence is mixed: the number of child abductions, for example, rose during the 1990s, but has been dropping for the past five years.
The numbers of children perceived to be at risk of both physical and sexual abuse are also falling.
The Lancashire headteacher says there have been incidents involving leisure-centre users in his school, but neither the local authority nor the police know of any and he was not available to elaborate.
So it seems that over the past 16 years this school has probably experienced only minor incidents as a consequence of the public having access to its site.
An increasing number of schools around the country are inviting adults in - and why not?
There seems to be little evidence that such initiatives have led to a wave of child abuse crimes.
But there are two ways to protect children. We can protect them by removing them from danger, and we can protect them by teaching them how to deal with danger when it arises. In recent years, it seems, we have focused on the former at the expense of the latter.
The Government's guide Working Together to Safeguard Children, published in 2006, is quite clear: schools have a key role to play in ensuring children know how to stay safe.
Pupils should learn how to deal with behaviour that is unacceptable to them, it says. In particular, they should be taught how to recognise and manage risks and how to develop effective ways of resisting pressure.
Yet while schools are apparently becoming increasingly aware of the need to protect children - and themselves - from the possibility of any kind of assault on school premises, it seems they have not always heeded the Government's exhortation that they should educate children to stay safe.
The delivery of personal, health and social education in schools is patchy, according to Ofsted. More alarmingly, a recent survey of more than 14,000 teachers failed to find any PHSE teachers with relevant post A-level qualifications. The Government intends to make the subject compulsory from primary, yet in many schools it is still not a priority.
A stronger emphasis on teaching children how to stay safe and how to manage risk sensibly would help schools to deal with these issues, as well as reassuring parents.
Yet it is surely time for a wider debate about how best to protect young people from harm.
In our increasingly risk-averse and litigious age, it seems that schools have retreated - almost literally in some cases - behind the barricades.
All sorts of risks could be averted were we simply to lock children away; yet who would argue that the best way to prevent teenage pregnancy would be complete separation of the sexes? Or even that the best way to cut sports injuries would be to ban rugby or football?
Children are members of society and, while young, they have to learn how to exist in the adult world.
The task of schools - and parents, too - is to prepare them properly for citizenship. If they spend their childhoods locked away behind security gates, how will they cope when they find themselves in the much more hazardous environment beyond them?
Fran Abrams, Investigative journalist and author of 'Seven Kings: How it Feels to be a Teenager'.