Theresa May is now making a desperate push to get Northern Ireland's Democratic Unionist Party to support in a third "meaningful vote" on her deal this week.
If she fails to get the deal passed she will have to go the EU summit in Brussels on Thursday, 21 March, and explain what her plan is with only eight days to go before Britain crashes out of the 28-country bloc.
Mrs May became leader of the Conservative Party, and therefore Prime Minister, in the summer of 2016 after David Cameron stepped down and Boris Johnson pulled out of the leadership contest.
She called a snap election in early 2017, hoping to gain a commanding majority, but her campaign was one of the most disastrous on record and she ended up scraping into 10 Downing Street only after bribing the DUP with £1 billion for Northern Ireland.
Soon after the June 2017 election she was jeered by residents in the wake of the Grenfell Tower fire in west London, which left her government looking distracted and unable to cope.
But how does Mrs May's inept leadership compare with others who have held the office of prime minister?
Neville Chamberlain (1937-40)
Neville Chamberlain was the youngest son of Joseph Chamberlain, a 19th century government minister, and half-brother of Austen, a former Chancellor of the Exchequer.
His family owned a manufacturing company in Birmingham and he became a Conservative MP for the city's Ladywood constituency in 1918, aged 49.
Chamberlain became Chancellor of the Exchequer in the 1920s and laid the foundations of the welfare state.
In 1937 he succeeded Stanley Baldwin as Conservative leader and Prime Minister and it was his task to deal with the rising aggression of Adolf Hitler and Germany.
Terrified of war, his answer was appeasement.When Hitler threatened Czechoslovakia, Chamberlain went to meet the German leader in Munich in 1938 and returned with his famous "piece of paper" which he claimed represented "peace for our time".
It represented no such thing.
In a famous debate in Parliament on 7 May 1940 after the disastrous Narvik raid Leo Amery, a fellow Conservative MP from Birmingham, quoted Oliver Cromwell's famous speech to the Long Parliament.
"You have sat too long here for any good you have been doing. Depart, I say, and let us have done with you. In the name of God, go," said Amery, a Conservative MP and former lieutenant-colonel in the British Army.
Three days later Chamberlain resigned — handing over to Winston Churchill — and by October 1940 he was dead, of bowel cancer, aged 71.
David Cameron (2010-2016)
Labour had held power for 13 years, under first Tony Blair and then Gordon Brown, but it had run out of ideas and been buffeted by the 2008/9 financial crisis, which was perhaps unfairly blamed on Brown, who had been Chancellor under Blair.
In May 2010 David Cameron, having supposed reformed the Conservative Party and made it no longer "the nasty party", breezed into power.
Cameron and Lib Dem leader Nick Clegg sort to portray themselves as modern men, tidying up "the mess that Labour left".
They undertook a programme of austerity that decimated Britain's poor and even the lower middle class.
The Europhobic wing of the Conservative Party became stronger and stronger and forced Cameron to include in his 2015 general election manifesto a promise to hold a referendum on membership of the EU.
Cameron won the election, trouncing an ineffective Ed Miliband, but was forced to call what became known as the Brexit referendum, in June 2016.
Cameron, May and new Labour leader Jeremy Corbyn all campaign for Remain, but the electorate ignored "Project Fear" and voted 52/48 to leave the EU.
The shock result forced Cameron to resign the following day.It was like the captain of the Titanic setting sail, hitting the iceberg and then handing over command to another officer while he escaped on a liferaft.
Lord North (1770-1782)
Among the political and military disasters to befall Britain, one of the greatest is the loss of America in the late 18th century, especially in hindsight.
An Old Etonian from a wealthy family, Frederick North became a Tory MP at the age of just 22 and became Chancellor of the Exchequer. He was seen as a "safe pair of hands" when he became Prime Minister in January 1770.
At the time the British Empire included most of the east coast of North America, as far south as Georgia.
When the American colonists baulked at paying high taxes for imports such as tea, Lord North was confrontational, rather than conciliatory.
After the British defeat at Saratoga in 1777 his commanders went on the defensive but eventually capitulated at Yorktown in 1781.
Lord North soldiered on, believing King George III — by then showing signs of mental illness — would allow him to negotiate peace, but on 20 March 1782 he finally resigned.
Anthony Eden (1955-1957)
Another calamitous leader was Anthony Eden, who had been an exceptional Foreign Secretary, which makes his disastrous grasp of foreign policy during the Suez crisis so inexplicable.
When Sir Winston Churchill decided to retire in 1955, aged 80, he reportedly told his aides he thought Eden "wasn't up to the job".
Within a year Eden had led Britain — with France and Israel as her allies — into war with Egypt over the Suez Canal.
British and French planes and ships began bombing Egypt and in November an Anglo-French force landed at Port Said.
But the United States was now a world superpower and Britain and France were forced by the Americans into a humiliating climbdown.
The British, French and Israeli forces were ordered to withdraw and in January 1957 a stressed out Eden retired on health grounds and was replaced by Harold Macmillan, a former captain in the Grenadier Guards.
James Callaghan (1976-1979)
In 1976 Labour Prime Minister Harold Wilson resigned unexpectedly, leaving the Foreign Secretary James Callaghan to take over. Callaghan, known to all as Jim, had a tiny majority and in March 1977 was forced to rely on the Liberal Party to rule.
The Lib-Lab Pact collapsed in the autumn of 1978 but Callaghan blundered on, rather than calling a general election.It was to be a fateful decision because the winter of 1978/79 was to prove politically catastrophic for Callaghan and Labour.
"I don't think other people in the world would share the view there is mounting chaos," Callaghan said on 10 January 1979, as he stepped off a plane from the Caribbean island of Guadeloupe, where he had been attending an economic conference.
The Sun newspaper paraphrased his words in the immortal headline "Crisis, what crisis?" and at the general election in May 1979 Callaghan and Labour suffered a landslide defeat at the hands of Margaret Thatcher's Conservatives.
Ramsay MacDonald (1924, 1929-35)
The first Labour MP had been elected in 1892 and the party gradually increased the number of seats it won, eclipsing the Liberal Party and becoming the party of the "working class".
In December 1923 Labour won the most seats it had ever won — 191 — but the Tories still won more.
But the ambitious Labour leader Ramsay MacDonald managed to cobble together a coalition of Labour, Liberal and some Tory MPs which lasted until December 1924, when it collapsed following publication of the Zinoviev letter.
MacDonald bounced back in 1929 and created another minority government, although this time Labour had won more seats than the Tories.
In 1931 Britain was hit by the Great Depression and MacDonald chose this moment to abandon his Labour comrades and his socialist values in order to retain the Prime Minister's job.MacDonald became the head of a new national government but was perceived as a traitor by working class communities.
As Germany and Italy rearmed and prepared for war, MacDonald was in charge of one of the most inept, drifting administrations in British history.
By 1934 MacDonald's mental and physical health had severely declined and many of his speeches in Parliament were incoherent.
"Things got to the stage where nobody knew what the Prime Minister was going to say in the House of Commons, and, when he did say it, nobody understood it," said one insider.
At the 1935 general election MacDonald not only lost the prime minister's job, he even lost his own seat at Seaham in County Durham.
When he died in 1937 few mourned him.
Edward Heath (1970-1974)
It was Edward Heath who led Britain into the Common Market, or as it later became known the European Union.
Heath, a lifelong bachelor, was never charged with any offence but there have been claims since his death in 2005, aged 89.
In 2017 the Metropolitan Police said if he were alive Heath would have been questioned over allegations he abused boys as young as 11.
Heath is on this list because of his inept handling of numerous industrial disputes, most famously that with the miners, which led to three-day weeks and regular power cuts.
In February 1974, facing a wave of industrial unrest, Heath asked the electorate: "Who governs Britain?".
The answer came back: "Not you."
The Tories lost 37 seats and Labour's Harold Wilson became prime minister.Heath lost another election in October 1974 and was finally replaced as leader of the Tory Party by Margaret Thatched in 1975.