Pupils took pity on bats within a colony that lost their home after a new Goldthorpe Primary School was built.
With assistance from a Barnsley Council team they fixed a specially designed bat box in a quiet corner of the playground.
Eco-schools ambassador Christopher Wharton Lovett said: “We are a very proactive eco school and the children love working outside, especially when they are creating homes for wildlife.
“By having a specially designed bat box we are able to survey and monitor the bat activity in our playground.
Bats are a vital part of our native wildlife, he added, accounting for almost a third of all mammal species in the UK.
“They occupy a wide range of habitats, such as wetlands, woodlands, farmland, as well as urban areas. They can tell us a lot about the state of the environment, as they are top predators of common nocturnal insects and are sensitive to changes in land use practices.
“The pressures they face, such as landscape change, agricultural intensification, development, and habitat fragmentation are also relevant to many other wildlife species, making them excellent indicators for the wider health of the UK’s wildlife.”
The eco-club at the school is one of many extra-curricular activities and meets each Monday.