“Nothing is more important than keeping our country safe,” Theresa May declared today. Yet she and her ministers spent the day sidestepping difficult questions in the wake of Saturday’s terrorist attack in London Bridge. Mrs May had no good answer when asked whether the police cuts have undermined counter-terrorism. She refused to be drawn into condemning Donald Trump’s shameful criticism of London’s mayor, Sadiq Khan, whose response to the weekend’s attack has been exemplary.

Unlike other world leaders, Mrs May has made an art of avoiding public confrontation with the US president. But – in the words of her initial response to the London Bridge attack – enough is enough. She should make clear to Mr Trump how offensive and unhelpful his extraordinary intervention was, and rescind the invitation that has been extended to him for a state visit later this year.

On policing, Mrs May has stressed that the most critical question is whether the police have the right powers, not numbers or resources, to combat terrorism. How convenient. Since she became home secretary in 2010, the number of frontline officers has fallen by almost 20,000, and the number of firearms officers by more than a thousand. These were not cuts reluctantly overseen by Mrs May; on the contrary, she enthusiastically embraced them, accusing the Police Federation of “crying wolf” about their impacts on frontline policing. She has cited falls in recorded crime as a justification for cuts, but the Office for National Statistics has raised concerns that budget cuts may lead to officers under-recording crime.

The immediate police response – and the heroism of officers at the frontline – is by far the most visible aspect of the police’s role in counter-terrorism. But no less important is the invisible role of neighbourhood policing in intelligence-gathering. Police officers on the regular beat can build up trusted relationships within the community they serve, acting as its eyes and ears. Cuts to police numbers cannot but impact on the capability of the police to fulfil this vital role. But days before a general election, Mrs May sticks to her line that they are not a problem, thus appearing to put her embattled personal reputation before national security.

Policing is not the only area in which austerity risks our security. The number of prison officers has fallen by a third since 2010, and many prisons are now operating at 150% of capacity. Prisons have not only become far more dangerous places as a result, with violence and drug-dealing increasingly common. They have also become schools for hate preachers, and prison governors lack the resources and the capability to respond. This makes a nonsense of the prime minister’s suggestion of longer sentences for those convicted of terrorist offences. Without investing significant resources into prisons, this could be entirely counterproductive.

Mrs May has also called for greater integration from Britain’s minority communities. But integration is yet another goal that has been undermined by public spending cuts in the last seven years. Funding for English classes for non-native speakers has been cut. The migration impact fund, which helped councils meet the costs of outreach officers and multilingual citizens’ advice bureaux, has been scrapped altogether. It is disingenuous to chastise communities for failing to integrate while steadily eroding the support that could help them to do so.

There are vexed questions involved with counter-terrorism – none more so than how to balance citizens’ liberty and security in the face of external threat. But Mrs May is using this complexity to distract from a simpler truth. Counter-terrorism doesn’t come cheap. It requires bobbies on the beat and prison governors with the resources to tackle extremism within their prison walls. Austerity not only ruins people’s lives: it jeopardises Britain’s security.

• This article was amended on 6 June 2017 to correct a reference to hate preachers.

