Donald Trump won the nomination to be the Republican presidential candidate in 2016 because of his “protectionist, xenophobic, misogynistic interventions”, the former British prime minister David Cameron has said.

Writing in his memoir, published in the UK on Wednesday, Cameron said he found it depressing and was immediately concerned that Trump – whom he called a “maverick businessman” – could win in the wake of the Brexit referendum result.

He said that “the rise of the far-left and hard-right parties in Europe [had] shown us that anti-establishment, divisive politics was the new normal.”

Cameron’s premiership ran from May 2010 to June 2016 and did not overlap with Trump’s presidency. Cameron’s tenure ended with the result of the Brexit referendum that Trump himself has repeatedly said foreshadowed his defeat of Hillary Clinton five months later.

Shortly after Trump won the Republican nomination, Barack Obama made a speech to Nato in Warsaw in which he compared Trump to the Russian president Vladamir Putin and warned of “the slippery slope that leads from criticizing, say, gay people or immigrants to the demonizing of whole nations, races and religions”.

Cameron, who was listening, wrote: “I couldn’t have agreed more”.

Writing in his 732-page memoir, For The Record, Cameron also attacked Trump’s criticism of “Islamic terrorism”.

“I always tried to speak about ‘Islamist extremism’ and ‘Islamist extremist violence’ rather than just use the label ‘Islamist’,” Cameron wrote. “Donald Trump doesn’t bother with that distinction. Indeed, he goes in the other direction, frequently referring to ‘Islamic terrorism’ which in my view is extremely unhelpful.”

Cameron described how one of his biggest regrets was not to have been in power when Iraqi forces took back Mosul in Iraq from Islamic State in July 2017, or to see Raqqa in Syria taken by Kurdish fighters.

When Isis appeared to crumble, Trump claimed responsibility by saying Isis was not on the run before because “you didn’t have Trump as your president.”

“I totally changed rules of engagement,” Trump said in a TV interview. “I totally changed our military, I totally changed the attitudes of the military and they have done a fantastic job.”

Cameron, who was prime minister while British and American hostages were being beheaded by Isis fighters, remarked in his book: “For all the subsequent bluster and boasting of Donald Trump, he was given a war that was well on its way to being won.”