Nearly half of Conservative party members would prefer not to have a Muslim prime minister, a survey into the scale of Islamophobia in the party has suggested.

The poll, carried out by YouGov for the anti-racism group Hope Not Hate, also found that more than two-thirds of Tory members believe the myth that parts of the UK are under Sharia law, and 45% think some areas are not safe for non-Muslims.

Half of the party’s members think that Islamophobia is a big issue, but only 8% believe it is a problem within the party, the survey found.

Matthew McGregor, Hope Not Hate’s campaigns director, said: “From the grassroots to the great offices of state, Conservative members buy into racist myths, with almost half unwilling to have a Muslim prime minister – and only 8% [saying they would be] proud to have one – and most denying there’s even an issue to confront.”

In the online survey of 864 Conservative members, 39% said they agreed that “Islamist terrorists reflect a widespread hostility to Britain amongst the Muslim community”, and 40% think there should be a reduction in the number of Muslims entering Britain.

The party’s membership base, thought to be about 160,000-strong, will vote in a leadership ballot to choose Britain’s next prime minister in the coming weeks.

Last month, the Muslim Council of Britain submitted 20 pages of evidence to the Equality and Human Rights Commission calling for an inquiry into Islamophobia in the party, with the Tory peer Sayeeda Warsi calling the problem “institutional”.

It has also been alleged that the party chairman, Brandon Lewis, ignored requests for racist and Islamophobic incidents reported by members to be investigated.

Hope Not Hate has written an open letter to Boris Johnson and Jeremy Hunt calling on them to publicly acknowledge the Islamophobia problem within the party and commit to tackling it if elected. They also want to see an independent body established to investigate the problem and the party to commit to an established definition of Islamophobia.

Both Tory leadership contenders appeared to endorse an independent inquiry when challenged by Sajid Javid during a live televised debate last week. However, Johnson has failed to retract comments he made about women in burqas looking like “letterboxes” and “bank robbers”.

The YouGov poll found 76% of members think the party is already doing “all it reasonably can” to combat Islamophobia and racism, and only 15% feel it should be doing more.

McGregor said: “After months of revelations that Conservative activists and councillors have been belatedly suspended or expelled over Islamophobic or racist incidents, the fact that the overwhelming majority of members think there isn’t an issue is chilling.

“The first step to challenge this crisis should be a show of leadership from Jeremy Hunt and Boris Johnson. They must both confront the racism of some party members and the complacency of others, state clearly that they accept there is a problem, and confirm their commitment at last week’s TV debate to a full and independent investigation.”