Bats which have held up a £300,000 school improvement project in Galloway have been identified as one of Scotland's rarest species.
The discovery of Leisler bats will further delay plans to re-roof Minnigaff Primary in Galloway.
Work was halted last spring when the protected mammals were first spotted in the school's loft space.
An initial survey found pipistrelle bats but officials now say the loft is home to the rarer Leisler species.
Dumfries and Galloway Council will have to apply for a special licence to re-house the Leislers.
Council official Rhona Wells said it could be October before the bats leave their summer roost and move out into the surrounding area.
She said: "At that time we will apply for a licence and will be able to block up the holes that they come into the building with, thereby stopping them roosting in the future.
"We will have to put up bat boxes on some of the elevations of the building and they will provide temporary homes for the bats if they do indeed want to come back."
She added: "In the long term we hope they will just leave the school and take up residence elsewhere."
Ms Wells added that if weather permits, the roofing project could proceed in November.
The Bat Conservation Trust welcomed the council's efforts to protect the bats.
Trust spokeswoman Heather McFarlane said: "Leisler bats are one of the rarest bats in Scotland and that is why their survival in Scotland is incredibly important."
Meanwhile, Dumfries and Galloway Council's ranger service has teamed up with the Dumfries Bat Group to produce a learning pack to encourage primary pupils and teachers to learn more about the elusive creatures.
The material, which is being funded by Scottish Natural Heritage, contains a series of bat-related activities covering science, research, English and maths.