MPs have voted to leave the Palace of Westminster while a proposed multi-billion pound refurbishment of the historic building takes place.
The Commons approved a motion calling for a “full and timely decant”, designed to allow essential repairs, by 236 votes to 220.
The planned move, part of a proposed £5.6bn modernisation, will not take effect until 2025 at the earliest.
Commons leader Andrea Leadsom said the era of “patch and mend” had to end.
The Lords will vote on the future of the iconic building next week.
Although the government has said the decision is a matter for Parliament, Ms Leadsom said the iconic building faced “critical risks”, with 60 episodes in recent years which could have led to a serious fire.
While any full-scale restoration programme would be likely to see MPs and peers leave for a “significant” amount of time, she said the Palace of Westminster “will always remain the home of Parliament” and this would be guaranteed in future legislation.
While Parliament needed to get on with the matter, she said the business planning must be rigorous to ensure value for money for the taxpayer.
During a three hour debate on the issue, several MPs argued that Parliament risked becoming a safety risk for all those who worked in it and urgent action was needed.
As well as the threat of fire, the building is seen as vulnerable because of its antiquated sewerage system and areas of the palace, which was largely rebuilt in the 19th Century after it burnt down, are riddled with asbestos.
A review by accountants Deloitte in 2014 estimated that a full decant would cost between £3.5bn and £3.9bn, a partial decant between £3.9bn and £4.4bn and a rolling programme of works, with Commons and Lords chambers being “vacated and then re-occupied” and lead to longer recesses, up to £5.67bn.
The motion passed authorises MPs to approve essential repairs but agree to review the “need for comprehensive works” before the next election, which is due in 2022.
In 2016, the Joint Committee on the Palace of Westminster warned that the decision on how to refurbish Parliament could not be delayed any further and backed a “full and timely decant” to Richmond House, a nearby building in Whitehall currently used by the Department of Health.
Backing this option. Labour’s Chris Bryant said for MPs to want to stay in the building while extensive building work was taking place was “bonkers” and they had a duty to preserve Parliament for the next 100 to 200 years.
“I say to colleagues, it is really time we got a grip of the situation and voted for something which might be inconvenient for us but is in the long-term interests of the nation,” he told Sky News.
But Conservative MP Jacob Rees-Mogg said he could no longer support the plan because the measurements had changed and the bulk of Richmond House would have to be demolished to make way for a replica chamber in its courtyard, considerably increasing the cost of the project.
DUP MP Ian Paisley said there was “no cheap option” and anyone who believed this was “deluded”.
“There is necessary work that needs to be done and necessary money that needs to be spent,” he said.
Labour’s Stephen Pound said it was vital that parliamentarians kept a “footprint” in the historic building, insisting “we cannot lose this, we have fought too hard for this”.
But the SNP’s Pete Wishart said the estimates for the various options were “eye-watering” and he would not be surprised if the entire project ended costing between £10bn and £12bn.
In a time of “austerity and belt-tightening”, he said he suspected refurbishing MPs’ place of work would be “near the bottom or at the bottom” of the public’s list of priorities.