Mutually assured destruction: May and Gove’s leadership row humbles them both

Theresa May and Michael Gove's spat over extremism has ended in mutual humiliation, with May losing her closest adviser and Gove being forced to apologise.

Fiona Cunningham, special adviser to the home secretary, was the first scalp claimed by the row, which overshadowed the Queen's Speech and forced David Cameron to duck out the G7 summit to answer questions on internecine warfare around his Cabinet table.

Michael Gove was forced to write a letter of apology to the prime minister and Charles Farr, director of the Office for Security and Counter-Terrorism, who also happens to be romantically involved with Ms Cunningham.

May and Gove, who are considered prime leadership contenders should Cameron step down, remain impregnable figures at the top of the government but for the first time there are rumours about their future, with some suggesting Gove could even be reshuffled later this month.

That remains unlikely given Gove's popularity and close relationship with Rupert Murdoch, but for there even to be rumours about a demotion – possibly to the Tory chairman role – shows how badly the row has hurt the education secretary.

Gove is a confidant of the prime minister but Downing Street is said to increasingly view his behaviour as "erratic".

He reacted angrily last year when May made a speech on free schools without notifying him – a move widely seen as preparing the ground for a future leadership bid.

Gove responded by speaking of his shock at seeing some in government participating in leadership speculation at the Cabinet table. May reportedly sat in stoney silence during the comments.

Friends of the education secretary say May is "dull and uninspiring" and without the intellectual ability to make it to the very top. For her part May thinks Gove is a "wild-eyed neo-con" who is too far to the right of the Tory party.

The apology will humiliate Gove but he will also be damaged by the demand that he answer questions in the Commons tomorrow when education watchdog Ofsted reports back on the 21 Birmingham schools which are alleged to have been targeted in a Trojan Horse plot by Muslim extremists.

The row began last week when Gove pre-empted the report with a briefing to the Times that the Home Office was at fault for failing to "drain the swamp" that fed extremism.

May retaliated by releasing a letter she had written to Gove accusing the Department of Education of failing to act when concerns about Birmingham schools were first brought to their attention in 2010.

The feud revealed a deeply complacent response from two prominent Cabinet ministers and suggested leadership bids were starting to obstruct efforts to deal with extremism.

"The prime minister is taking a specific interest in ensuring this serious matter is being dealt with effectively.," a Downing Street spokesperson said.

"The detailed findings of the investigations will be set out in parliament on Monday by the secretary of state for education.

"The prime minister has made clear that he expects a robust response from all relevant organisations to any findings that confirm that the safety and learning of children in our schools have been put at risk."

Yvette Cooper, shadow home secretary, said: "This week has highlighted the chaos at the heart of the government's efforts to tackle extremism and the damage done to the Prevent programme by the home secretary's and education secretary's inability to work together.

"Theresa May's closest adviser has resigned for inappropriate release of ministerial correspondence yet the letter to the education secretary was signed and sent by the home secretary on the same day it was leaked to newspapers.

"Was this letter written in order to be leaked and did the home secretary authorise its inappropriate release?"