Foraging, the act of gathering wild plant and animal materials from the environment, is becoming more and more popular in cities around the world. In South African cities, some people pick wild berries and imifino (wild spinach) in open areas, considering them to be fresher and more nutritious than store-bought foods. Many people also associate foraging with their cultural heritage, reminding them of time spent in the bush or on rocky beaches harvesting mussels with elders or childhood friends. Read more: South Africa is rich in plants used for skincare: rural women helped us document some But although some plants that are popular with foragers are also grown in public parks, many people who forage in cities worry they could be told to stop by the authorities if they forage in public parks and gardens. My research found that this fear is often misplaced.I am an urban ecologist, and for my PhD, I investigated the ways in which urban people connect with nature through foraging.I also visited cities along South Africa’s east coast and interviewed 80 foragers and 15 municipal officials who manage public parks, gardens, verges and nature reserves, and looked at the theories behind foraging. I wanted to find out whether city residents shared an understanding of how foraging could benefit both people and nature, and where people could forage safely and sustainably. My research found that most people gathered plants from vacant land and roadsides, avoiding parks and public gardens because they feared being reprimanded. But land managers generally supported foraging in public spaces, and some even planted useful species for people to harvest.Better communication between residents and land managers could help make urban foraging work for both people and nature.Where can people forage sustainably?My research identified four main urban green spaces that can be managed by land managers and the public to make them better for foraging. These were communal residential gardens and yards, public street sides and verges, public parks and gardens, and nature reserves. I didn’t look into vacant land, because although these lots are important spaces for foragers, they are not actively managed by the municipality or their owners. I then looked at how people could protect urban biodiversity while still using it. A common concern, often described as the “Tragedy of the Commons”, is that if everyone freely collects wild plants and other resources, populations will be depleted and habitats damaged. But research has shown that this isn’t always true. Where people share an interest in a resource, they can agree on ways to use it without destroying it. Read more: We revealed the value of Zambia’s wild yam. Why it matters For urban foraging, this could mean that foragers, land managers and other people using the same spaces agree on what can be collected and where. They could also agree on who can forage, when, how much can be collected and how to make sure plants and other species are not overused.The key is to make these rules practical and clear, and for the people using these spaces to have a say in how foraging is managed. Read more: Drought and farming: how women in South Africa are using Indigenous knowledge to cope It turned out most people agreed that dedicated foraging areas, on their own or in existing parks and gardens, would be best for both people and biodiversity. This is because foragers would feel comfortable that they weren’t breaking the law, and parks managers wouldn’t worry that foraging everywhere would make the gardens look untidy. However, they thought that encouraging foraging in dedicated nature reserves would involve the greatest risk because of the danger of human disturbance.What needs to happen nextMunicipalities should co-design spaces to allow for sustainable urban foraging, and reach agreement with local communities on how these will be managed. I found that many foragers pick wild edible fruits and herbs and medicinal species from the edges of roads and sidewalks, often when walking to work or in their communities. However, I found only three species of wild edible fruits had been planted by municipalities. The government and municipalities could plant more wild fruit trees, especially near schools and busy public places, like playgrounds and police stations – not just for food, but also to provide shade. Read more: Africans survived 10,000 years of climate changes by adapting food systems – study offers lessons for modern times Municipalities need updated internal guidleines on which species to plant, and how to design spaces that promote sustaianble foraging. These should set out how much people should take and leave when foraging.I recently published a general guideline for foragers drawing on years of reading from around the world. It helps to consider whether a species is robust and resilient when harvesting, or delicate and needing careful handling when picking, where it is in its reproductive cycle, and if other human and non-human foragers depend on it – but when in doubt, ask someone who knows. Read more: Why aren’t South Africans growing more indigenous crops? How farmers can be nudged to change their ways Building on this research, some colleagues and I also published a guideline for urban land managers in South Africa. We suggest planting species such as wild plums (Harpephyllum caffrum), wild date palm (Phoenix reclinata), Num-num (Carissa sp.), and Kei apple (Dovyalis caffra) that are resilient to harvesting. It’s also necessary to communicate how much of a plant can be safely harvested without killing the plant. This can be done through public engagement like signboards, talks, and walks co-organised by the municipality and citizens. Read more: Growing your own food and foraging can help tackle your ballooning grocery bill. Here’s how My more recent research has found that in the long term, foraging has significant physical and mental health benefits. These include being exposed more nutrients, gut bacteria, and immunity, and a greater sense of personal satisfaction and belonging to place.Foraging also contributes to knowledge, skills and social ties because foragers learn from one another, and often bond over experiences of nature, food, crafting and wellbeing. It can help conserve biodiversity by protecting existing green spaces or creating new green spaces that people value for the cultural and spiritual connection they provide to nature. To harness these long-term benefits, urban municipalities and people need to start working together to create foraging spaces now.Mallika Sardeshpande does not work for, consult, own shares in or receive funding from any company or organisation that would benefit from this article, and has disclosed no relevant affiliations beyond their academic appointment.