As Theresa May’s cabinet prepares to sell her beleaguered Brexit deal to MPs and around the country, we take a look at the different factions and how they are preparing for plan B should the prime minister’s proposals be voted down.

The Gang of Five

This group, led by the chancellor, Philip Hammond, has been meeting weekly for private talks to explore the different soft Brexit options if parliament rejects the deal. The most likely alternative is a permanent customs union, which could get the backing of a majority of MPs. They have also discussed the Norway-plus option – with the welfare secretary, Amber Rudd, thought to be particularly interested – though this would be problematic for May’s red line on free movement. The de facto deputy prime minister, David Lidington, a solid remainer before the referendum, is mistrusted by some leavers but has played a key role in developing May’s plan. He is unlikely to survive if the prime minister falls. The business secretary, Greg Clark, a loyal lieutenant to his fellow remainer in No 11, may be averse to grandstanding but has quietly spelled out to colleagues how much business needs frictionless trade. The justice secretary, David Gauke, is another former Treasury minister who backs a soft Brexit and wants the UK to maximise access to EU markets afterwards. Clark and Gauke are thought to be prepared to consider a second referendum.

The Pizza Club

A group of Brexiters, convened by Andrea Leadsom, has been meeting to share their concerns about the May’s plans over takeaways and wine, although the Commons leader protested at cabinet: “I don’t even like pizza, prime minister!” While they all have deep-rooted concerns about the withdrawal agreement, they have decided to try to win the debate about what happens next from within. The international development secretary, Penny Mordaunt, is still seen as most likely to jump. The transport secretary, Chris Grayling, knows his fortunes are closely tied to May’s. The trade secretary, Liam Fox, is a long-term Eurosceptic, but the only one of the ideological Brexiters who has gone public to defend the deal so far. And while the others might prefer a hard Brexit plan B, the environment secretary, Michael Gove, whose decision to stay in cabinet potentially saved May’s premiership, is more pragmatic, looking at Norway-plus.

Ultra-loyalists

Every prime minister needs a few ministers who she can rely on whatever happens. May is no exception. Whichever option she goes for when MPs reject her deal as seems almost inevitable – a second attempt, renegotiating with Brussels, a second referendum or even a general election – they are likely to stand by her. A trio of trusted May lieutenants from her Home Office days are at the heart of this group: the Northern Ireland secretary, Karen Bradley, the communities secretary, James Brokenshire, and the Tory party chair, Brandon Lewis. The latter acts as a crucial buffer between the pro-Brexit party grassroots and the prime minister. The Welsh secretary, Alun Cairns, and culture secretary Jeremy Wright, would also go to the wall for May. Stephen Barclay, the virtually unknown new Brexit secretary, has not rebelled in all his time as a backbencher and, as he is a friend of May’s chief of staff, Gavin Barwell, and has just been given his first cabinet role, he is unlikely to start now.

Born-again Brexiters

These ministers all have their eyes on the biggest prize of all: being on the right side of the Brexit debate when May does eventually step down. The foreign secretary, Jeremy Hunt, was a leading remainer who now says he has changed his mind and would vote leave if he had his time again. The home secretary, Sajid Javid, was a natural Eurosceptic who backed remain at the behest of David Cameron but appeared to regret his decision after the vote, which lost him the trust of many Tory Brexiters. He has been treading a careful line between scepticism and loyalty ever since. The defence secretary, Gavin Williamson, previously a low-key remainer, has grown keener on Brexit as the months have gone on, although he has recently kept his counsel. The Treasury chief secretary, Liz Truss, awkwardly for her boss, the chancellor, has had a damascene conversion and is now a fully signed-up leaver. It will not have passed any of them by that the next leader of the Tory party will have to unify MPs as well as win the support of the predominantly Brexiter membership.

Loyal for now

While they represent different factions of the Tory party, these ministers have all come out in support of the prime minister’s deal, for now. However, they will each ultimately do what they consider best for their careers, the Tory party and the country. The attorney general – and long-standing Brexiter – Geoffrey Cox has concluded that the divorce deal is legally problematic, but it is better politically than no deal. The Scotland secretary, David Mundell, has had concerns about fishing rights and Northern Ireland-only arrangements. Along with the Scottish Tory leader, Ruth Davidson, a fellow remainer, he is fearful these would fuel calls for Scottish independence. The health secretary, Matt Hancock, who was close to George Osborne, has survived, even thrived, under May and has played a relatively straight bat on Brexit. The education secretary, Damian Hinds, declared himself “very disappointed” by the referendum result but then moved on in his own undramatic way. The chief whip, Julian Smith, has the toughest job of all over the next two weeks. He may not be delighted with the hand he has been dealt, but he will stick with it for now.