Conservatives are to oppose a bid to transfer further housing powers
Assembly members have voted in favour of proposals to extend powers over housing in Wales.
The housing legislative competence order (LCO) would transfer powers over the right to buy council homes.
The Conservative party has been criticised for opposing the vote, as they are against changing the "right to buy" legislation.
Ministers argued new Welsh laws were needed to tackle homelessness and increase supply of affordable homes.
Political opponents accused the Tories of inconsistency on the issue of further powers for the assembly.
The order would convey more wide ranging powers than just that needed to end the "right to buy", which was introduced by the Thatcher government in the 1980s.
It would also give the national assembly powers over social housing and housing for vulnerable people, as well as providing for the regulation of social landlords.
AMs hope to facilitate its passage through Westminster before the general election.
A Conservative spokesman said before the vote: "The assembly government have known since the beginning of this process that we are opposed to the transfer of 'right to buy' powers and we will oppose this order on that basis."
Although the assembly government had enough votes to pass the legislation, the Conservative position has been criticised by opponents.
Two weeks ago, the Tories voted in favour of a referendum which, if won, would devolve full law-making powers to Wales in devolved fields - including housing, which covers right to buy powers.
Former Welsh Liberal Democrat Assembly leader Mike German said: "They're bonkers. I think it's ridiculous to vote for a referendum to seek further powers, then refuse to accept them when they're offered on a plate."
The debate on the order represented the assembly government's second attempt to gain further powers over housing.
The first attempt was withdrawn after a row between Cardiff Bay and Westminster which found Welsh MPs worried new powers would be used to scrap the right to buy.
Nick Bennett, chief executive of Community Housing Cymru (CHC), said: "This is the second housing LCO that CHC has given evidence to in the past two years and I would be flabbergasted if it fails.
"This comprehensive LCO is not just about the right to buy. If it falls then it endangers the chance to form progressive legislation to prevent homelessness, increase tenants' rights and also improve regulation - which is essential for securing additional private lending into the housing sector in the future."
Mr Bennett added that the right to buy was "effectively suspended" last year by the credit crunch rather than government.
He said: "As a former member of the All Wales Convention I have to say that I am perplexed by the opposition to drawing down legislative powers in the field of social housing when only two weeks ago there was a unanimous vote on holding a referendum across all devolved areas.
"It's a little like saying you want to go to war but not into battle".