BY APPEARING on last weekend’s Meet the Press, an American current-affairs programme, David Cameron was sending a message to his local audience that Britain was back as America’s closest and most reliable ally. Although much of the interview was about the prime minister’s support for the nuclear deal with Iran, what Mr Cameron really wanted to convey was that Britain would “step up and do more” in the fight against Islamic State (IS) in Iraq and Syria. “Be in no doubt,” he said, “we are committed to working with you to destroy the caliphate in both countries.” He acknowledged that he would still need to persuade Parliament to extend Britain’s bombing campaign to Syria, but left little doubt over his intentions.

The murder on June 26th of 30 British holidaymakers on a Tunisian beach by a jihadist gunman with links to IS has had a galvanising effect on Mr Cameron. He believes that the atrocity has reminded voters that what he sees as the “poison” of Islamism has to be confronted militarily as well as ideologically. In a speech on July 20th he declared that “passive tolerance” of extremism and jihadist propaganda was unacceptable.

That is not all. Since his election victory in May, Mr Cameron has been at pains to reverse a growing impression among Britain’s allies that the country has lost its strategic ambition at a time when threats are multiplying. In Washington there was concern over British defence cuts that seemed destined to intensify. American diplomats had started referring to “Great Shrinking Britain”. A particularly hurtful gibe was that America now saw France, after its dashing intervention against Islamist militants in the Sahel, as a more spirited military ally than Britain (see article).

Barack Obama himself lobbied Mr Cameron on the importance of Britain sticking to its commitment to meet NATO’s totemic defence spending target of 2% of GDP (on some projections, it was due to fall to 1.7% by 2020/21). Mr Cameron reacted tetchily, saying that any decision must await a spending review in the autumn. But the criticism must have hurt, because on July 8th the chancellor, George Osborne, announced that Britain would after all meet the 2% pledge for the rest of the decade, with defence spending growing by a real 0.5% a year. In addition, a new joint security fund of £1.5 billion ($2.3 billion) a year would be shared between the Ministry of Defence and the intelligence agencies, the chancellor said.

This has created a very different backdrop for the quinquennial Strategic Defence and Security Review that is now under way. The government can claim that Britain will remain Europe’s biggest defence spender and that the armed forces will be getting the £160 billion worth of shiny new kit (including two aircraft carriers) over the decade from 2013, as they had been promised.

Doubts linger. In Iraq and Syria, Britain’s role is constrained by the absence of a coherent American strategy. An expanded mission for the Royal Air Force will have little bearing on the outcome of the war against IS. On current plans, fast-jet strength will reach an all-time low by 2019, calling into question the sustainability of Britain’s contribution. Mr Cameron must also win permission for a Syrian campaign from the House of Commons, where he has a majority of only 12—and where only two years ago he failed to persuade MPs to punish the Assad regime’s use of chemical weapons. Above all, public support for military efforts abroad is fragile. The results will need to be better than those of the recent past to maintain it.