A former Conservative prisons minister has accused Michael Gove of using Britain's national security council to promote "neocon" ideas that could encourage moderates to move towards Islamist extremism.

Crispin Blunt spoke out after an extraordinary cabinet row broke out between Gove and Theresa May over how to tackle extremism.

The home secretary went public with direct criticisms of the education secretary's handling of the Trojan horse affair – suggesting an internal cabinet tussle over who can be toughest on threats of extremism.

May wrote to Gove after he apparently lost an argument within the Whitehall committee that addresses extremism. He then wrote to the prime minister setting out his ideas.

Blunt said Gove had a record of promoting a neocon agenda within the government. The former prisons minister told the Today programme on BBC Radio 4: "Michael Gove has played a role on the national security council of holding the security establishment to account from a neocon perspective, asking some pretty hard questions. But the fact is the establishment has a pretty good grip on extremism and the whole counter-terrorist strategy."

May and Gove tried to put on a united front by releasing a joint statement saying they were working together.

In a statement issued at lunchtime, a government spokesperson said: "Extremism anywhere in society is a serious problem and we are working together across government to deal with it. That was shown by the work of the prime minister's extremism taskforce. There is no difference between the education secretary and the home secretary who are both working energetically together to tackle the challenge posed by any form of extremism."

Tensions between the pair first erupted last year when Gove accused May of promoting herself as a future leader,

Aides to Gove compared the tactics of Islamist extremists towards schools to the Militant Tendency, which sought to infiltrate the Labour party in the 1980s. Sources told the Times he was particularly critical of Charles Farr, who runs the office for security and counter-terrorism (OSCT) within the Home Office, for failing to confront extremism.

A Department for Education (DfE) source told the Times: "[The extremists] have set out over time to take over and subvert governing bodies of schools using entryism in the same way as political parties have been taken over, such as Militant Tendency. Some have been very wary of drawing attention to this, as it might be seen as Islamophobic. That is why there has been a reluctance to acknowledge what has been going on.

"Tony Blair recognised this space. Within government there has been pushback against doing that. Charles Farr always believed if extremists become violent we should deal with it. It has been characterised by others in government as just beating back the crocodiles that come close to the boat rather than draining the swamp."

Blunt hit back at the Gove strategy of seeking to drain the swamp. He said: "It has bubbled up here where the DfE are responsible for our schools but ironically Michael Gove's strategy of draining the swamp would actually mean addressing the whole issue of faith education in our schools and the Home Office is gently pointing out it would be impossible to behave in the way he proposes."

The former minister added that Gove's approach would be "impractical and counter-productive" because it would be seen by people as seeking to paint the world as black and white. "You would find that people who are in the shades of grey are then driven into being black because they are invited to choose between black and white."

In a letter released on Tuesday night, May upbraided Gove for the DfE's handling of allegations regarding Islamists in Birmingham schools for what she called "the inability of local and central government to tackle the problem effectively".

In her letter to Gove, May asked: "Is it true that Birmingham city council was warned about these allegations in 2008? Is it true that the Department for Education was warned in 2010? If so, why did nobody act?"

May went on to tell Gove: "It is clear to me that we will need to take clear action to improve the quality of staffing and governance if we are to prevent extremism in schools."

She said: "The publication of a code of practice for supplementary schools was an agreed Extremism Task Force commitment and we agreed at the conclusion of the ETF's work that the code should be voluntary.

"However, since the publication of the ETF report in December there have been serious allegations of extremism in some Birmingham schools and accusations about the inability of local and central government to tackle the problem effectively.

"In this context, I am not convinced that a voluntary code is sufficient and I believe it would be sensible to include the option of developing a mandatory code in your consultation document."

She said the consultation document should be clear that "nobody should be forced to dress in a particular way" but warned against changing the task force's agreed definition of Islamist extremism.

"The consultation document should be clear that nobody should be forced to dress in a particular way. We do, however, need to recognise that many moderate Muslims, as well as people of other religions, believe that covering one's hair is a religious requirement and some parents will therefore want their children to do so.

"The text on dress requirements should therefore not be part of the extremism definition but, consistent with the government's already-stated position on the burqa, we should state clearly that nobody should be forced to dress in a particular way."

The shadow home secretary, Yvette Cooper, said: "For two such senior ministers to launch a vitriolic public blame game in this way is appalling and irresponsible when they should be working together to sort out such serious problems.

"Preventing extremism is immensely important – in communities and in schools. The truth is that Michael Gove's reforms have made it easier, not harder, for schools to be run inappropriately, while Theresa May has cut back Prevent programme funding that previously worked to tackle a wide range of extremism.

"They have both failed to prioritise this issue and are now engaging in playground activity rather than acting like secretaries of state. Too often both Michael Gove and Theresa May resort to public blame games rather than taking any responsibility themselves or working together with others. This is bad government and David Cameron should sort it out."