THERE was a shambolic start to Theresa May’s Cabinet reshuffle when the Tories mistakenly announced that the former transport secretary Chris Grayling was to be the party’s new chairman, before quickly deleting the incorrect tweet.

At 37 seconds, Grayling may now hold a world record for shortest tenure in government. About an hour later, Downing Street announced that Immigration Minister Brandon Lewis would be taking up the job, replacing Patrick McLoughlin who stood down from the role.

McLoughlin had been widely blamed for last year’s disastrous election campaign, and for the security lapse that allowed prankster Simon Brodkin into the party conference to hand the Prime Minister a fake P45 during her speech.

This was May’s second reshuffle in just over six months. It was in part caused by the resignations of Priti Patel, Michael Fallon and Damian Green.

Patel, was effectively sacked for hosting unauthorised meetings with Israeli politicians and not telling the Prime Minister nor the Foreign Office, and Green went for lying about watching pornography on his office computer. Fallon was caught up in a row over sexual harassment.

There was little change among the top jobs. Amber Rudd remained as Home Secretary, David Davis stayed on as Brexit Minister, and Philip Hammond was kept on as Chancellor.

Jeremy Hunt had social care added to his Health Secretary brief, regardless of the crisis gripping the NHS in England under his leadership.

Despite blunders which led to Iran threatening to increase the prison term imposed on British woman Nazanin Zaghari-Ratcliffe, who was wrongly jailed as a spy, Boris Johnson remains as Foreign Secretary.

James Brokenshire resigned as Secretary of State for Northern Ireland, citing ill-health. It’s understood he will undergo an operation to remove a lesion on his right lung. There was sympathy from across the political spectrum.

Deidre Brock, the SNP’s Northern Ireland spokeswoman, said: “I wish James Brokenshire all the best with his health challenges and I hope he has a full recovery. In my dealings with him, I found him to be open and always professional, despite the clear political differences we have.

“Northern Ireland secretary is one of the most demanding posts in the UK Government, especially with the current impasse at Stormont and the difficulties Brexit brings.’’ Ireland’s foreign affairs minister, Simon Coveney said: “His unwavering commitment – in public and in private – over the last year to securing the effective operation of the devolved power-sharing institutions in Belfast has been hugely important.

“While it is not always obvious to the public gaze, very important progress has been made on significant issues over the last year and I believe that a positive outcome can still be achieved.

“If it is, it will be a testament to the quiet, understated but hugely valuable work of James Brokenshire.”

Karen Bradley moves from culture to replace Brokenshire.

May appointed Justice Secretary David Lidington to replace Green as Cabinet Office Minister, though he has not taken on his porn scandal predecessor’s role as de facto deputy prime minister. Lidington will, however, likely take over Green’s role in Brexit negotiations with the Scottish and Welsh governments.

David Mundell stays on as Scottish Secretary. Justine Greening quit as education secretary and is replaced by Employment Minister Damian Hinds.

David Gauke leaves the DWP to become Justice Secretary, while his old job goes to Esther McVey. Penny Mordaunt continues as Secretary of State for International Development.

Greening’s departure was the biggest upset of the reshuffle. It is understood she turned down the Work and Pensions role. In her resignation statement she said: “Social mobility matters to me and our country more than a ministerial career.

“I’ll continue to work outside of government to do everything I can to create a country for the first time that has equality of opportunity for young people wherever they are growing up.”

Sources at No 10 said May was “disappointed” but respected Greening’s decision to leave the Government.

Sajid Javid is also staying in position, though his brief changes from Secretary of State for Communities and Local Government to Housing, Communities and Local Government, making him the first UK minister with a housing department title since the 1970s.

James Cleverly was appointed Tory Deputy Chair, and, in a revamp of party operations, Chris Skidmore, the Constitution Minister, is now Vice-chair for Policy. Ben Bradley and Kemi Badenoch – who both entered Parliament last year – were made vice-chairs for youth and candidates respectively.

Maria Caulfield’s appointment as Vice-chair for Women caused anger because of her views on abortion.

Labour branded the appointment an “appalling decision”, while the British Pregnancy Advice service said it was “incredibly disappointing”.

Caulfield led opposition to the campaign to decriminalise abortion last year, arguing that more consideration should be given to the rights of the unborn child. She spoke out against Diana Johnson’s 10-minute rule Bill to decriminalise abortion, saying “more must be done to effectively combat the dangerous liberalisation of abortion, which hides under the premise of championing women’s rights”.

Scots Tory boss, Ruth Davidson tweeted: “Looking forward to working with the new top team at CCHQ, @BrandonLewis & @JamesCleverly – let’s get stuck in!”

Davidson also tweeted about Greening’s departure, posting: “Sorry to see @JustineGreening leave government – she brought her no-nonsense, northern accountant’s eye to every brief and is a real role model for LGBT+ Conservatives.”