Brandon Lewis is the new chairman of the Conservative Party and will also take on the role of minister without portfolio.
The Great Yarmouth MP will take over from Sir Patrick McLoughlin in the role which is seen as key to the smooth running of the party.
Perhaps to prove the point that a new party chairman was needed, the Tories initially sent a tweet out congratulating Chris Grayling as the new chairman before quickly deleting it.
Mr Lewis has long been tipped for the role after what many saw as a chaotic party conference in the autumn in Manchester and a disastrous general election in the summer.
After posing outside Number 10 for pictures with the prime minister Mr Lewis tweeted: 'Am honoured to be made chairman of the @Conservatives a great party delivering for people across the UK with a superb team.'
This is a significant promotion for Mr Lewis to a cabinet-level post after three-and-a-half years in lower-ranking ministerial jobs including immigration. His deputy will be Braintree MP James Cleverly, who he also worked with in his immigration post.
A tweet on the official @conservatives channel congratulating Mr Grayling on the appointment was deleted within moments of being sent, but not before it had been shared by a number of Tory MPs and reported on TV.
Theresa May's first major reshuffle since taking office in 2016 was also marked by the unexpected departure of Northern Ireland Secretary James Brokenshire, who quit the government on grounds of ill-health weeks ahead of major surgery for a small lesion to his right lung.
Confirming he was leaving Mrs May's top team after almost two years as party chairman, Sir Patrick – who was blamed by many Tories for the party's poor showing in last year's snap election - told Sky News: 'I've been in the Cabinet eight years. I have had a very good run and I enjoyed it immensely.'
The appointment of Mr Lewis as Sir Patrick's replacement and minister without portfolio was initially overshadowed by the mistaken announcement that Mr Grayling was being moved from Transport Secretary to Conservative chairman.
A Tory source said that CCHQ political director Iain Carter sent the image appearing to confirm Mr Grayling's appointment as chairman to a majority of the party's MPs in a WhatsApp message, before deleting it and saying it was sent in error.
Mrs May kept the biggest beasts in her cabinet in post. Chancellor Philip Hammond, foreign secretary Boris Johnson, home secretary Amber Rudd and Brexit secretary David Davis.
Former justice secretary David Lidington was appointed to Damian Green's old position of minister for the Cabinet Office, but did not inherit the title of first secretary of state.
It was thought that both health secretary Jeremy Hunt and business secretary Greg Clark could be moved. But last night rumours were rife in Westminster that both men were keen to remain in their roles leading the prime minister to think again.
Analysis: Chris Grayling – to his amazement no doubt – was the Conservative Party chairman for 27 seconds.
It was a chaotic start to a cabinet reshuffle that Theresa May hopes will bolster her team and not upset anyone too powerful.
The mix up came about when a member of staff sent a picture of Mr Grayling to MPs for them to then send on via social media while also doing so on the official account. Less than half a minute later it had been deleted. Not a great start.
Mrs May – propped up by the DUP, with a party still split over Brexit – was not as brutal as she might have liked. The big beasts remain: Boris Johnson, Philip Hammond, Amber Rudd, David Davis. And some potential movers apparently refused to budge which highlights the PM's weakness.
There was shock at business secretary Greg Clark remaining in position. He is not highly regarded and Mrs May could regret not letting him go at this opportunity. It is unlikely he would have launched a leadership or attempted to unsettle the government if he had been sacked.
But she chose the right time to reboot. She is stronger than she has been for months and, with a few new faces desperate to impress, this could be a turning point.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here