Keir Starmer has sacked Angela Rayner as chair of the Labour party in a move that risks igniting a fresh civil war inside Britain’s main opposition party.

The demotion of Rayner — who remains deputy leader — comes amid bitter recriminations after a set of local elections in which Labour lost ground in key battlegrounds against Boris Johnson’s Conservative party.

Rayner is expected to be moved into a different shadow cabinet role that will be more “public-facing”, according to those close to the situation. “She connects with working class voters,” said one party grandee.

The move is expected to herald a wider reshuffle by Starmer as he attempts to get back on the front foot. But one member of the shadow cabinet called the sacking “absolutely disgraceful”, adding: “They are just in bunker mode, lashing out at everyone else because they are to blame.”

Another prominent left-winger described the move as “insane” and counter-productive, given Rayner had served loyally under the leader. “It makes Keir look even more untrustworthy and unprincipled.”

Starmer had said on Friday that he took “full responsibility” for a series of setbacks including the loss of Hartlepool in a by-election and the failure to win either the Tees Valley or West Midlands mayoralties from the Tory incumbents.

At the same time the Labour party suffered a net loss of council seats across the country, despite gaining the West of England and Cambridgeshire mayoralties and holding Manchester.

“Keir said he was taking full responsibility for the result of the elections, and he said we need to change,” said one party aide. “That means change how we run our campaigns in the future. Angela will continue to play a senior role in Keir’s team.”

But the sacking prompted accusations that Starmer was making Rayner take the blame for the overall disappointing results.

Labour has been shedding votes among white working-class voters in the Midlands and northern England, many of whom were angered by the party’s Remain position during the 2016 EU referendum.

Rayner, who grew up in Stockport — in north-west England — became a single mother at 16, leaving school with no qualifications before training in social care and becoming a union representative at Unison.

Amid a febrile atmosphere inside Labour — with talk of a leadership challenge from the left — Owen Jones, a prominent leftwing commentator, said Starmer was trying to “scapegoat” Rayner for Labour’s “disaster”.

“Trying to pin the blame on a working class woman for their lack of vision of strategy, their lack of answers to the country’s problems,” he said. “The absolute pits.”

On Friday evening some of Starmer’s allies were privately blaming her for the poor results. In turn her supporters had complained that she was ignored on electoral messaging.

Rayner will remain Labour’s deputy leader because the position was achieved through a vote of the membership.

Possible replacements for a chair include Chris Bryant, MP for the Rhondda, or Ian Murray, the party’s only MP in Scotland.

One well-placed Labour party insider said: “I can’t see how sacking Rayner achieves anything at all. The last leadership was marked by its incompetence, but it’s hard to conclude this one is anything but childish.”

Starmer’s reshuffle is expected to coincide with the launch of a policy review designed to reassert his leadership. Senior figures at risk include Anneliese Dodds, shadow chancellor, and Nick Thomas-Symonds, shadow home secretary, who are still largely unfamiliar to the general public after more than a year in post.

While Labour made gains in “Remain” areas of the country such as Cambridge and Bristol, the Tories gained control of councils including Harlow and Northumberland.

Some MPs blamed Jenny Chapman, chief of staff in Starmer’s team.

“Sacking Angela to save Jenny’s arse is a very very stupid thing to have done,” said one Labour figure. “This will cause civil war and Keir will lose it.”

Deborah Mattinson, who founded the polling firm Britain Thinks, has been appointed as new head of strategy for the Labour Party. Mattinson, who recently wrote a book called “Beyond the Red Wall”, was previously a pollster for former Labour prime minister Gordon Brown.