Allotments, weedy corners and fancy gardens are all urban havens for bees and other pollinators, a study has found.

The widespread decline of bees resulting from the loss of wild areas and pesticide use has caused great concern in recent years, but towns and cities have been suggested as potential sanctuaries.

The first research to examine all types of land use in cities has identified pollinators’ favourite places and flowers, many of which are often considered weeds. A team of more than 50 people spent two years examining pollinators and plants in Bristol, Edinburgh, Leeds and Reading.

The results enabled them to work out the best ways to support a rich mix of pollinator species that will be resilient to climate change and other challenges. The best strategy is increasing the number of allotments, the report says. Planting preferred flowers in gardens also helps, as does mowing grass in public parks less frequently, allowing flowers to bloom.

Allotments are particularly good places for pollinators because they provide a mix of fruit and vegetable flowers, plus weedy corners full of native plants. “Allotments are incredibly important at a city level, despite their small area,” said Katherine Baldock at the University of Bristol, who led the research. “They are a good place for pollinators to hang out and provide a win-win situation, as they are also good for food growing and for people’s health.”

The research, published in the journal Nature Ecology and Evolution, found allotments and gardens often had 10 times more bees than parks, cemeteries and urban nature reserves. Baldock said nature reserves were important for other wildlife but were often less suitable for pollinators, being dominated by trees rather than meadows.

The scientists also identified the flowers most visited by bees, hoverflies and other pollinators. Native favourites included brambles, buttercups, dandelions, creeping thistle, common hogweed and ox-eye daisies. “People tend to think of these as weeds, but they are really important for pollinators,” said Baldock.

She said gardeners had an important role to play in pollinator conservation, with the non-native plants that attracted the most pollinators being lavender, borage, butterfly bushes and common marigolds. Hydrangeas and forget-me-nots were among the least favourite. The researchers found that gardens in more affluent neighbourhoods harboured more pollinators, thanks to there being more flowers and a richer variety of plants.

Stephanie Bird, of the Royal Horticultural Society, said: “This new paper shows that gardens are a hugely important resource for pollinators in urban areas. We would encourage the UK’s 27 million gardeners to pack in a variety of plants, as not all pollinators can access the nectar of each plant, and consider introducing plants to bloom across all seasons.” The RHS is now working with the University of Bristol to find which plants produce the most nectar.

Gardens cover between a quarter and a third of cities, far more than allotments, which cover less than 1%. But increasing the area of allotments gives the biggest boost to pollinators per unit area, the study found.

“It would be great if government made an effort to free up more land for allotments,” said Prof Dave Goulson, of the University of Sussex. “Currently there are about 90,000 people on waiting lists to get one. Given that these areas also produce healthy fruit and veg for local, zero-food-miles consumption, and get people out in the open air taking exercise, it would seem that allotments perform vital roles in our cities.”

Bee-harming pesticides have been banned from farm fields across the EU but some are still sold to gardeners. “If we really want to maximise the value of urban areas for wildlife, we would do well to stop using pesticides in our gardens and parks,” Goulson said.

Urban pollinators have been less studied than those in rural areas, so the importance of cities and towns to their survival is only now being worked out. The most comprehensive study to date found little difference in their abundance, perhaps because both are poor habitats, with many rural areas dominated by farmland and cities dominated by concrete and tarmac.

“Perhaps we could come to see our cities as giant nature reserves, places where man and nature can live side by side,” said Goulson.