David Cameron has moved to stop the outbreak of cabinet squabbling over the chaotic response to the floods crisis amid signs he may have "banged ministerial heads together".

With the crisis worsening almost hourly, the prime minister was clearly angered that his attempts to show he was in control of the situation were being undermined by a ministerial blame game.

At the start of a two-day visit to the flood-hit southwest, Cameron sent out the clearest possible message to ministers that they should be getting on with the job in hand rather than arguing among themselves or trying to blame the Environment Agency.

"Everyone should get on with the job they are doing. That's all I am interested in at the moment," he said.

Asked about suggestions by communities minister Eric Pickles that Environment Agency boss Chris Smith might lose his job, the prime minister said: "This is not the time to change personnel but to get on and do everything we can."

Smith is set to stand down in three months and Cameron suggested that would be the time for a rethink.

"There will be time later on to talk about these things," he said. "Right now, everyone's got to focus on the job in hand."

The row escalated when Pickles used a series of weekend interviews to lay the blame for the handling of the crisis firmly at Smith's door. That saw environment secretary Owen Paterson, who is off work recovering form an eye operation, writing to Cameron to complain about his stand-in's "grandstanding".

Smith also hit back, praising his staff and blaming problems in dealing with the unprecedented weather on government cuts.

By Monday afternoon, Pickles was striking a very different note in the Commons, praising agency workers and suggesting it was Labour trying to score "silly party political points" from the affair.

"Frankly, to play this rather pathetic game of who is to blame... There will be a time when we will be able to look very closely into the causes of the floods and the reaction of government. But right now we should get on with the job," he said.

His words brought a derisory reaction from opposition MPs who reminded Pickles it was he who had, just 24 hours previously, directly blamed the agency and its staff for giving ministers bad advice.

Former Labour minister Peter Hain accused Pickles of "arrogant bluster".

"He ought to be apologising instead of continuously passing the buck and saying it is everybody else's responsibility not the government's," he said.

It was suggested in Westminster that Cameron had told ministers to stop passing the buck which had added to the impression of a government desperately attempting to wriggle out of its responsibility and detracting from his attempts to portray himself as "in charge".

That is already proving a hugely difficult task as residents line up to attack the government for lack of action and ignoring persistent warnings of an inevitable crisis.

And there were continuing criticisms of Pickles with claims that his blunt approach was out of place when dealing with a crisis affecting thousands of people's daily lives.

Cameron will hope his intervention has now ended this political row before it does irreparable damage to the government.