Towns across West Wiltshire have been told to take over the running of their sports centres or they will be closed as part of a massive leisure shake-up.

Five centres in the area will close for good while seven others will close if community-led trusts cannot raise enough money to take them over.

Trowbridge will see the closure of the sports centre in Frome Road and the Castle Place leisure centre in 2017, while Melksham’s Blue Pool and Christie Miller sports centre will shut in 2013. Warminster Sports Centre will close in 2021.

Corsham’s Springfield Leisure Centre will be closed in 2015 unless a community trust is formed to run it.

The swimming pools at Westbury and Bradford on Avon will close if they cannot be transferred to the community by 2017. Other centres at Leighton in Westbury, Pewsey, Tisbury and Wootton Bassett will shut in 2015 unless the towns take them over. The council will build community hubs, which will include leisure facilities, in Melksham, Trowbridge and Warminster.

It will spend £117 milion on the three new hubs and upgrading other centres across the county. It will also give a grant to the Wiltshire School of Gymnastics at Bowerhill.

The investment will be funded by saving £93 million on transferring the centres and the sale of the five centres not open to transfer.

The council has yet to find sites for the three new hubs or decide what will be in them.

Leader Cllr Jane Scott said: “We are not going to be able to deliver these services.

“Over 18 months we have been reviewing them so we know everything inside out. It was like opening Pandora’s Box. We won’t just be walking away from them. We will put them into a state of good repair before they go.

“Then any group that wanted to take them on could put money aside to do any future repairs.”