David Cameron has backed his beleaguered home secretary, Theresa May, amid Labour accusations that the government is presiding over a "complete fiasco" on immigration control and is seeking to pass the buck.

The prime minister clashed with the Labour leader, Ed Miliband, as he backed May's decision to pilot a more relaxed regime of passport checks at airports and ports and defended the decision to suspend Brodie Clark, the head of the UK Border Agency's border force.

May is under pressure to explain her decision to accuse Clark of improperly relaxing passport checks at Britain's borders.

In his resignation statement, Clark – who was suspended after the controversy erupted last week – accused May of misleading parliament and making him a political scapegoat.

He resigned on Tuesday, and flatly denied "improperly" extending a relaxation of entry controls. He intends to sue for constructive dismissal.

During the Commons exchanges, Miliband accused the government of incompetence and a "blame everybody else" culture.

"You are an out of touch prime minister leading a shambolic government," the Labour leader said.

Cameron defended the pilot, approved by May, which he said had seen the number of people arrested rise by 10%, alongside increased drugs and firearms seizures, and "did not compromise security".

He backed the decision to suspend Clark, telling MPs the relaxed rules had been extended without authorisation from May or the chief executive of the UKBA, Rob Whiteman.

The prime minister said Whiteman – who has been in his job since September – "also didn't know that this unauthorised action was taking place".

Asked by Miliband about the numbers let through under the pilot, Cameron said: "We should be clear about what did and what did not happen here.

"First, the home secretary did agree a pilot for a more targeted approach to border control. This was for people within the European economic area – it allowed better targeting of high-risk people and less for others, notably children.

"This did not compromise security. This was an operational decision, but one I fully back and think that she was right to take.

"Second, decisions were taken to extend this beyond European economic area nationals. This was not authorised by the home secretary – indeed, when specific permission was asked for, it was not granted."

He said that "as this was unauthorised action, as it was contrary to what the home secretary agreed, it is right that the head of the border force was suspended … I back that action completely".

He added that the borders were not "undefended" as passports continued to be checked.

Cameron quoted Whiteman, who had said Clark had admitted to him on 2 November that, on a number of occasions this year, "he authorised his staff to go further than ministerial actions. I therefore suspended him from his duties".

Whiteman added: "In my opinion, it was right for officials to have recommended the pilot so we focused attention on high risk to our border. But it is unacceptable that one of my senior officials went further than was approved".

Cameron told the Commons: "That is why he [Clark] was suspended, that is why the home secretary backed that decision.

"But it's an important issue to understand that Brodie Clark was suspended by the head of the UK Border Agency. It was a decision quite rightly taken by him, backed by the home secretary, backed by me."

Miliband said it was "totally unacceptable" that May chose to relax border controls in July and yet could not tell MPs on Tuesday which airports and ports those relaxations applied to, how many took it up and for how long.

He added that it was "utterly typical" of the government that "when things go wrong, it is nothing to do with them" and quoted May as saying, before taking office, that she was "sick and tired" of ministers who "blame other people when things go wrong".

Cameron responded: "The pilot that the home secretary introduced meant more arrests, more firearms seized, more forged documents found. That is the truth of it.

"The fact is that officials went further than Home Office ministers authorised. That is what is wrong, and that is why someone had to be suspended. That was the right decision."

Cameron went on to list the government's achievements on securing the UK's borders, saying it had done more to control immigration in 18 months than Labour had in 13 years.

But Miliband fired back: "Anyone listening to you would think your policy has been a great success. It's a fiasco – it's a complete fiasco."

Cameron was asked about the number of job losses in the UK Border Agency amid claims that some of the relaxed measures were deployed because of staffing shortages.

The prime minister said 18,000 people would be working for the Borders Agency by the end of this parliament, "the same number as were working for the UK Borders Agency in 2006, when he was sitting in the Treasury and determining the budgets".