Malm was told by immigration officials his presence in the UK “may not be considered to be conducive to the public good”. He said the decision was “scandalous” and urged the government to reconsider.

He was due to speak alongside Huda Ammori, a co-founder of Palestine Action. They were expected to discuss the impact of the ban, including its effect on the author Sally Rooney, who has withdrawn her books from sale in the UK over her support for the group.

Malm said: “I am deeply dismayed at this sudden ban on travelling to the UK. I have been going to the UK for decades – this is where I did my archival research for my PhD dissertation and lectured at dozens of universities and participated in even more conferences.”

Malm urged the government to think again. He said: “One was under the impression that the Burnham government had slightly more respect for the basic notions of freedom of expression and other democratic rights. I appeal for this decision to be overturned.”

The Home Office said it did not discuss individual cases.