A historic canal building once threatened with demolition is to be opened as a small museum.

The Wilts and Berks Canal Trust has been handed the 18th century Sack House in Wantage by developer Barratt Homes.

And the trust is raising £10,000 to have the Grade II listed building in The Wharf open as a local history museum in 18 months.

The Sack Hiring Company office was used to transport flour from Wantage mill along the old Berkshire and Wiltshire canal, which was abandoned a century ago.

Brian Stovold, chairman of the East Vale branch of the trust, said: “It was one of the historic buildings at the entranceway to Wantage Wharf. It’s still there 200 years later whereas quite a few buildings are no longer there.”

The museum will tell the story of the old wharf, mill and tram.

Mr Stovold added: “It’s a small building but there is just enough space to put a few displays in and put the area into context.”

In 2009, the Grade II listed building was threatened after Barratt Homes applied to knock it down.

But Vale of White Horse District Council refused permission as the building was historically important. The developer sold the building to the trust for £1 this year providing it is only used as a museum and not sold on.

Mr Stovold said: “A lot of residents here are delighted to see it preserved for the town.”

The trust is fundraising for a £1m project to restore the canal towpath between Oxford and Bath over the next five years.

It hopes eventually to see the whole canal restored – which would cost more than £200m and could take 25 years.

Mary Bryan, technical director at Barratt, said: “It has been a pleasure to be involved with saving and restoring Sack House.

“We wish Wilts and Berks Canal Trust all the best for the future.”