The scrapping of the right-to-buy for council and housing association tenants has been overwhelmingly backed by Holyrood.

The Scottish Government plans to end the right in a bid to boost the number of homes available in the social rental sector.

Conservative housing spokesman Alex Johnstone made a last-ditch attempt to save right-to-buy - which was first introduced by Margaret Thatcher's government in 1980 - but this was rejected by the Scottish Parliament.

MSPs voted by 103 votes to 12 against his amendment to the Housing (Scotland) Bill, which would have seen the right-to-buy retained.

An estimated 534,000 tenants in Scotland currently have the right to buy their home but the Scottish Government argues ending the policy could keep about 15,500 properties in the social-rented sector over a 10-year period.

Mr Johnstone told MSPs that the policy had been the "greatest driver for social change in 50 years" and added: "It has driven the aspiration for home ownership and it has been a positive in many areas."

The Tory denied right-to-buy had resulted in homes being taken out of the social rental sector, saying most were bought by long-term tenants who would have stayed in the properties if they had not bought them.

"By removing the right-to-buy, houses will not be freed up," he insisted.

"In fact the suggestion is that in the first year as few as 30 houses maybe freed for new tenancies as a result of this change."

He then warned that abolishing the policy could spark a "feeding frenzy" with renters looking to buy their council or housing association home.

"The Government may lose rather more houses than it expects to save," Mr Johnstone said.

He insisted scrapping the policy was a "mistake" and would be "counter productive".

The Tory argued the Government's desire to scrap the right was driven by "political rather than practical aspirations" and vowed: "I will determinedly dig in my heels today to defend a policy I believe has contributed positively over large areas of Scotland."

But housing minister Margaret Burgess said "Ending right-to-buy will preserve valuable social housing, increase choice for tenants and those on waiting lists, and help ensure social housing's role in mixed tenure communities that people want to live in."

She added: "In the face of all the evidence that right-to-buy has had its day and has no place in the Scotland we want to build, Mr Johnstone continues to call for this outdated and unpopular policy to continue.

"This can only surely be because of his party's historic attachment to right-to-buy.

"But surely even he must accept it flies in the face of what is best for landlords, tenants and communities as a whole."

She told MSPs that more than 450,000 homes had been sold as a result of right-to-buy, saying this had been "a major cause of housing shortages in many areas".

Green MSP Patrick Harvie backed the abolition, saying that right-to-buy had promoted the idea that "owner-occupation is the tenure of choice to which everybody ought to aspire to" and had "contributed to the stigmatisation" of other parts of the property market.

Labour's Mary Fee also backed scrapping the right-to-buy but argued the policy should be abolished within one year of the Bill gaining Royal Assent, instead of the two years proposed by the Scottish Government.

"Those that wish to exercise that right have had a decent amount of time in which to do so," she said.

"One year is a fair and equitable time period."

But Ms Burgess said cutting the notice period to a year "could mean there is a real risk that tenants could be rushed into buying and doing something they can't afford".