Image copyright AFP Image caption The majority of the iconic building dates back to the mid-19th Century

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 debate and vote on their views on the future of the building next week.

Although the government has said the decision is a matter for Parliament, Mrs 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.

Media playback is unsupported on your device Media caption Pound: Palace of Westminster is a statement

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 sewage 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 the cost of repairs with 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 endorses a 2016 report by the Joint Committee on the Palace of Westminster which warned a 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.

Image copyright UK Parliament Image caption A senior parliamentary official recently warned that Parliament could become the next Grenfell Tower

Image copyright AFP Image caption The current rolling programme of repair work is no longer viable, many MPs believe

Former Cabinet minister Damian Green said Parliament was not safe in its current condition and it was not a "wild exaggeration" to say that it is a "death trap".

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.

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.

And 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".

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.