The future of an endangered 18th century Grade I listed building is still in the balance after it was announced lottery funding could be withdrawn.

Last month, senior officials from St Mary's University College, in Twickenham, handed the keys to Horace Walpole's Villa, known as Strawberry Hill, to representatives of the Strawberry Hill Trust so work could begin on an £8.9 million restoration project.

But it emerged this week that £4.9m in funding from the Heritage Lottery Fund (HLF) might be withdrawn due to a problem with the educational space available in Walpole's little Gothic castle', in Waldegrave Road.

The HLF, which has a strong emphasis on education, demanded a second classroom for craft activities, but the only place to provide it is in a ground-floor room of the adjoining Waldegrave wing which remains in college use.

St Mary's said it was prepared to allow the trust to use the room on a 25-year lease, which a college spokesman said was enough to ensure the funding was provided, but will not grant a 125-year contract term to match the lease on the villa itself.

Rob Marshall, from the university college, said: "The teaching room would be in the middle of the Catholic university college and we would effectively have a tenant within our existing teaching space, though with separate access.

"We have agreed to this in principle for 25 years to adhere to the stipulations laid down by the Heritage Lottery Fund, but the governors did not accept 125 years for the teaching room because St Mary's is still expanding and the governors felt that 125 years was a long time to commit to."

Between 1747 and his death in 1790, Horace Walpole transformed the Twickenham building into a celebrated Gothic masterpiece, which had its vulnerability recognised in 2003 when the World Monuments Fund included it on their list of 100 most endangered sites in the world.

Its future looked secure when the keys were handed to the Strawberry Hill Trust, which was formed in August 2002 with a purpose to take over Strawberry Hill, carry out its restoration and open the house to a wider public.

It was hoped work would begin next year and be completed in 2010.

But Michael Snodin, chairman of the Strawberry Hill Trust, said earlier this week if there could be no agreement reached for a second room there would be no lottery funding, which would place the restoration project in doubt.

Mr Marshall said St Mary's had fulfilled all the other criteria demanded by the HLF.

"We're delighted that Strawberry Hill is to be renovated and we've done as much as we can to enable it to happen," he said.

"We hope that a compromise with the trust can be reached.

"The multi-million pound funding deal depends on this, so it's very important."

Strawberry Hill Trust was contacted this week for further comment but had not responded at the time of going to press.