Council house tenants in Wrexham have voted against proposals to transfer ownership of the town's 13,000 council homes to a housing association.
Council housing in Wrexham is in need of modernisation
A total of 58% of the 9,722 tenants who voted did not want to hand over ownership to a newly-created independent housing association.
The decision leaves the local authority with a £274m headache - the amount it needs to find to improve its housing stock by 2012.
Wrexham Council had ruled that it could not afford the modernisation bill and had recommended the switch to Wrexham Housing -Tai Wrecsam.
The result - based on a 68% turnout - has been hailed by Wrexham AM John Marek, who has long been opposed to the idea.
He said: "I very much welcome the decisive result and I congratulate Wrexham tenants.
"I urge the council to treat housing seriously and there must be no redundancies as a result of this vote."
He has called for a meeting between him, the council and the Welsh Assembly Government to resolve the situation.
Council leader Shan Wilkinson had urged tenants to vote for the change in ownership.
She had said the move was in the best interests of the tenants as it would unlock the investment needed to deliver central heating, new bathrooms, and new kitchens.
She had said: "I believe that tenants deserve a better standard of home. Transfer is a way of providing this while keeping rents affordable.
"Tenants would still have the right to buy their home and to claim housing benefit."
Many of the council homes were built in the 1920s and have never had their bathrooms or kitchens updated.
The Welsh Assembly Government has told all Welsh local authorities that council housing must be brought up to the Welsh Housing Quality Standard by 2012.
A tenants vote in favour of the transfer would have allowed an independent not-for-profit housing association to be set up by the council in order to own and manage the housing stock.
The result means Wrexham council retains ownership of the 13,000 homes.