The head of HM Revenue and Customs received two death threats after disclosing that a post-Brexit customs option preferred by Brexiters would cost up to £20bn, it has emerged.

Jon Thompson, the UK’s most senior tax official, said the intimidating statements were reported to the Metropolitan police and had forced him to make changes to his personal security and routes to work.

A number of prominent politicians have received death threats over Brexit, but this is the first time that a senior civil servant has gone public over such a matter.

The threats followed an appearance before the Treasury select committee in May when he was asked about HMRC’s appraisal of “maximum facilitation” proposals, which would mean the UK would not have to follow EU rules on goods.

Speaking at the Institute for Government on Thursday, Thompson said disclosing the costs had led to “very significant personal consequences”. “We have had to literally change how I travel and what my personal security is. We have had two death threats investigated by the Metropolitan police for speaking truth unto power about Brexit,” he said.

“Those are real situations. I’m still not going to back away from [telling the truth] if I think something’s not going to work – it’s incumbent on me. We live in a democracy, so in the end, it’s for governments to decide, ministers to decide, what they want to implement,” he said. “But our role as civil servants is to act with integrity and to give them our best advice.”

Thompson’s comments on the cost of max fac arrangements were seized upon by remain campaigners as evidence that the cost of leaving the EU single market and customs unions was too high. Thompson said he had not anticipated the scale of the backlash to his warning.

“You know you’re in a [significant] moment because the question is a very powerful one and the answer is very stark,” he said. “The first I knew it was significant was when my 28-year-old son texted me with: ‘You’re trending on Twitter.’ [I thought:] ‘Oh, is that a good thing? I don’t know.’”

A Downing Street spokesman said the threats were very concerning. “It is unacceptable for threats to be made against anyone.”

Nicky Morgan, the chair of the Treasury committee, told PoliticsHome it was “appalling that a public servant should be threatened for doing his job”. “I am sure Mr Thompson considered what he said very carefully. As someone who has also been threatened, it is deeply concerning that this is what Brexit seems to have done to public life,” she said.

Following a Daily Telegraph front-page story in December which described Tory MPs who voted against the government’s Brexit plans as “mutineers”, Anna Soubry and Dominic Grieve received dozens of threats.

Rhodri Philipps was jailed for 12 weeks in July 2017 after offering money for someone to kill the Brexit transparency campaigner Gina Miller.