As David Cameron said in his resignation speech, the EU referendum was far bigger than any one politician. As the markets plummeted amid questions over Britain’s future relationship with its biggest trading partner, the decision to leave is the start of a process, the result of which even the most ardent Brexiteer cannot guarantee. The first, second and third things in the new prime minister’s in tray will be to negotiate the best deal for Britain’s exit of the EU and entry into uncharted territory.

But for Britain’s Jewish community, this is nevertheless a moment to reflect on a premiership that will be remembered alongside that of Margaret Thatcher and Tony Blair for its warmth towards Anglo-Jewry and Israel. While communal organisations stayed clear of the Brexit debate, the statements of appreciation to Cameron haven’t been hard to come by.

His time in Downing Street coincided with terror attacks on Jews in Toulouse, Brussels and Paris and unprecedented unease of the community here in the wake of the Gaza conflict. But Cameron repeatedly demonstrated he understood the threat faced by world Jewry and, moreover, that demonisation of Jews and the Jewish state could often be seen as the first sign of the extremism that threatens wider society.

It was his government that funded guards at Jewish schools as one of its first acts in office and added an extra £11million of security funding last year. Gerald Ronson – a man who knows a thing or two about tackling hate – said then: “After a lifetime of fighting anti-Semitism, I’ve never seen such a level of support.”

His admiration for survivors of the Holocaust and personal commitment to ensuring the horrors are not forgotten were given practical expression in his Holocaust Commission. The new national memorial and state-of-the-art learning centre in the heart of Westminster will be, as the Holocaust Educational Trust pointed out, his legacy, even if he will now not be attending its opening as prime minister.

The outgoing PM has become one of Israel’s greatest international friends, perhaps the greatest after Canada’s Stephen Harper was given his marching orders in that country’s election last year. But it was a rocky start as far as Israel’s supporters were concerned when he described Gaza as a “prison camp”, and failed to once mention Hamas, in a speech in Ankara during his first summer in the job. However, he quickly did what his predecessor had promised by changing the law of universal jurisdiction to prevent it being exploited to arrest Israeli officials and other foreign visitors.

But it was his stance during the conflict between Israel and Hamas in 2014 – a position criticised by the opposition and some on his own side – that means he will be remembered as an all-weather friend. So, too, his position on boycotts including on countering boycott, divestment and sanctions movements from councils and public bodies, even if this boiled down to reiterating existing guidelines rather than banning boycotts.

With hours until last week’s vote, a buoyant sounding Cameron even kept a date to address Jewish Care’s annual dinner. It now seems a fitting measure of the cross-party appreciation of his support that it was Lord Levy, a Labour peer, who led the plaudits to the Conservative leader that night. The appreciation was mutual, with Cameron saying Jewish functions were among the most patriotic he has attended and hailing the charity as the very definition of the Big Society he championed. Also present was outgoing Tory chairman Lord Feldman, who has also played a role in ensuring the community’s concerns are understood in government.

Many will now be questioning whether Cameron should ever have conceded this referendum; whether a vote he believed could end in such catastrophic consequences should it go the wrong way was worth the risk.

Even those who backed remain must now hope the Brexiteers were right all along; that although the immediate signs were less than reassuring, what was dubbed ‘Project Fear’ was just that and nothing more.

It’s not easy to look beyond the seismic events of the past few days. But whatever your views on the issue that will define his leadership, our community has much to be thankful to Cameron for.