The right to buy council homes will be abolished in a move to protect access to rented properties, Deputy First Minister Nicola Sturgeon has announced.

The decision, which affects about 15,000 houses, completes the previous reforms and suspensions to right-to-buy legislation across Scotland.

Ms Sturgeon, visiting Queens Cross Housing Association in Glasgow, said: "It is absolutely vital that people can access social housing when they need it most. Social housing is under significant pressure and so too are the budgets that support it.

"The Scottish Government is doing everything possible to maximise our investment in housing and deliver on our target of 30,000 new, affordable homes over the lifetime of this parliament. But, given the pressure on both the housing stock and budgets - and with 400,000 people on waiting lists for social housing - we can no longer afford to see badly needed homes lost to the social sector.

"That is why I am today announcing the final stage of the abolition of the right to buy, a decision that will safeguard Scotland's social housing stock for the benefit of citizens today and for our future generations."

Affected tenants will have three years from the date of royal assent of the Housing Bill, expected in autumn next year, to exercise their right to buy before it is abolished.

Since it was introduced by Margaret Thatcher's Conservative government in 1980, around 455,000 properties have been bought in Scotland using the scheme.

The policy has led to a shift in home ownership, with 65% of homes now owner-occupied, according to the Scottish Government.

It has also been blamed for the reduction in the number of affordable rented houses, leading to longer waiting lists.

The Scottish Government says it will continue to help people buy their own homes through schemes such as shared equity.

Graeme Brown, director of housing charity Shelter Scotland, said: "We welcome the news that this outdated policy, which for a long time has had no place in Scotland's housing landscape, is to be scrapped.

"Around half a million public sector homes have been sold off in Scotland since the policy was implemented. Meanwhile 157,000 families and individuals are today stuck on council waiting lists for a home to call their own.

"Shelter Scotland has long campaigned for the abolition of right-to-buy and praises the Scottish Government on their decision to protect existing and future council house stock in a bid to address Scotland's chronic housing shortage."

Andy Young, of the Scottish Federation of Housing Associations, welcomed the decision to end the policy and said: "It has been beneficial to a relatively small number of individuals but clearly a loss to the greater public good."

Convention of Scottish Local Authorities housing spokesman Harry McGuigan said: "This allows local authorities much better control of their housing stock, which is important, especially in the current economic circumstances.

"This benefits not only those needing a home but essentially everyone who is paying council tax. Elected members decided unanimously last September that the right to buy should be ended in the shortest practical time-frame and we fully support today's announcement."

Former Scottish Conservative leader Annabel Goldie said she is ''deeply disappointed'' with the decision. The SNP has some ''very hard questions'' to answer about what it will do for the next generation of property owners, she said.

"This was a policy which arguably was one of the most socially liberating policies we have ever seen in Scotland and across the United Kingdom," Miss Goldie said.

''I could still remember the days when people lived in monolithic council house schemes, that's what they were called, and they were afflicted by a postcode prejudice.

''They were apprehensive about disclosing their address because they felt it would negate their chance of getting a job or even being accepted for an interview, and by offering a tenant the right to buy you did two things: you first of all introduced a freedom to the individual to make a choice about how they wanted to live and secondly you stopped them being trapped in that environment because that's exactly what they were."