MPs have supported both Houses of Parliament moving out during the multibillion-pound restoration programme.
They committed to a “full and timely decant” after deleting sections from a motion which would have allowed them to kick into the long grass the need for “comprehensive works” at the Unesco World Heritage Site.
A body would also be established to provide up-to-date costings of the work and a “realistic” timetable for the repairs.
It also guarantees both Houses will return to their “historic” chamber “as soon as possible”, something Commons Leader Andrea Leadsom had earlier noted would be put in law should they move out.
The amendment was tabled by Public Accounts Committee chairwoman Meg Hillier and was viewed as a way of ensuring more rapid progress to repair the Palace of Westminster compared with two motions tabled by Mrs Leadsom.
But Conservative former minister Sir Edward Leigh warned during the debate that Ms Hillier’s amendment could result in MPs leaving Parliament for up to 12 years and effectively authorise the spending of £5 billion during a time of “unparalleled austerity”.
Sir Edward, who was in favour of allowing the Commons debating chamber to remain in the Palace of Westminster or Portcullis House during the works, said: “Do not believe it will only be for five years.
“I predict that we will be out of this building for 10 or even 12 years because actually the Canadian parliament… they are moving out for 12 years.
“And we have to say to our constituents, do we really believe at this time of unparalleled austerity… we should now take the decision to spend upfront, this evening £5 billion on our own working place?
“I think that’s a very difficult decision, a very difficult argument to make to our constituents.”
Tory MP Damian Green addresses the Commons (PA)
But Theresa May’s former deputy, Conservative MP Damian Green, warned Parliament was not safe in its current condition and it is not a “wild exaggeration” to say that it is a “death trap”.
After referring to the importance of action in the wake of the Grenfell Tower fire, Mr Green added: “Having seen the appalling effects of a fire in a building that had inadequate protection, it would be the height of irresponsibility not to take action to make safe a building which we know is now barely safe and which is getting more dangerous every year.”
Mrs Leadsom said there can be “no blank cheque” for the work, also noting: “The Palace of Westminster is the seat of our democracy, an iconic, world famous building, and it is in dire need of repair.”
All divisions were considered free votes to allow MPs to choose the way forward they believed to be the best.
Gas pipes and a mass of cables in the underbelly of the Palace of Westminster (Stefan Rousseau/PA)
Ms Hillier’s amendment was supported by 236 votes to 220 – majority 16.
The amended motion was then voted upon and approved by 234 votes to 185, majority 49, which included support from 68 Conservative MPs – with Justice Secretary David Gauke, Mrs Leadsom and Cabinet Office minister David Lidington among them.
The division list showed 156 Labour MPs supported the amended motion along with seven Lib Dems, DUP MP Ian Paisley (North Antrim), Independent Kelvin Hopkins (Luton North) and Green Party MP Caroline Lucas (Brighton Pavilion).
A total of 166 Conservative MPs voted against the amended motion, including Communities Secretary Sajid Javid.
They were joined by 10 Labour MPs, two SNP, six DUP and independent MP Charlie Elphicke (Dover).
Peers are to consider the restoration and renewal of the palace on February 6.