A controversial new adviser to Boris Johnson resigned on Monday night after MPs and experts accused No 10 of condoning his controversial claims that intelligence is linked to race.

Andrew Sabisky, who was brought into Downing Street by Johnson’s senior aide Dominic Cummings as part of his appeal for “misfits and weirdos”, became the subject of intense media scrutiny after details emerged of his views on subjects ranging from black people’s IQs to whether benefits claimants should be encouraged to have fewer children.

But amid mounting criticism within the Conservative party after No 10 stood by the appointment, Sabisky said that he would be stepping down as a “contractor” to No 10.

He tweeted: “The media hysteria about my old stuff online is mad but I wanted to help [the government] not be a distraction. Accordingly I’ve decided to resign as a contractor. I hope No 10 hires more [people with] good geopolitical forecasting track records and that media learn to stop selective quoting.”

The news of Sabisky’s exit came despite the government’s apparent determination to ride out the controversy, with a Downing Street spokesman refusing to answer more than 30 questions from reporters on whether Boris Johnson agreed with Sabisky’s views.

His resignation represents a defeat for Cummings, Johnson’s most powerful aide, whose abrasive approach to government is causing consternation among some Tories and is thought to be partly behind Sajid Javid’s departure as chancellor.

Sabisky, a 27-year-old who describes himself as a “superforecaster”, had been contracted to work on special projects for Cummings, who had said in a job ad that he was seeking a team “to find and exploit, without worrying about media noise… ‘very high leverage ideas’ [that] these will almost inevitably seem bad to most.”

But a political furore broke out after some of Sabisky’s past writings on genetics emerged over the weekend. In one post from 2014, he suggested that politicians should pay attention to “very real racial differences in intelligence” when designing the immigration system, and another from that year suggested black people on average have lower IQs than white people.

In a book review, he also argued that benefit claimants “tend to be less conscientious and agreeable” and should be encouraged to have fewer children than people in work with more “pro-social personalities”.

Ian Lavery, the Labour party chair, said Johnson still has questions to answer about how and why Sabisky was ever appointed.

“It’s right that Andrew Sabisky is no longer working in government. He should never have been appointed in the first place,” he said.

“After Number 10 publicly stood by him today, Boris Johnson has serious questions to answer about how this appointment was made and whether he agrees with his vile views.”

With Downing Street remaining silent, John McDonnell, the shadow chancellor, said the appointment was a direct reflection on Johnson’s leadership. “You can’t have people with these views operating at the heart of your government unless you agree with them. For Johnson to refuse to act and to condemn these views says as much about himself as it does about Sabisky.”

Some Tory MPs also began to question No 10’s judgement in having hired Sabisky. Caroline Nokes, the Tory chair of the women and equalities committee, was the first Conservative to go on the record to criticise No 10’s handling of the situation.

“Cannot believe No 10 has refused to comment on Andrew Sabisky. I don’t know him from a bar of soap, but don’t think we’d get on ... must be no place in government for the views he’s expressed,” she said.

A second Tory MP, William Wragg, broke cover on Monday evening, saying Sabisky “needs to go” and arguing that his presence in No 10 was “a poor reflection on the government and there is no way to defend it”.

“‘Weirdos’ and ‘misfits’ are all very well, but please can they not gratuitously cause offence. I cannot be the only one uncomfortable with recent No 10 trends,” he added.

The calls for Sabisky’s departure became more concerted on Monday as more examples of his previous writings emerged. Another internet posting from 2014 suggested the government could “legally enforce universal uptake of long-term contraception at the onset of puberty” to help prevent a “permanent underclass”.

In 2015, Sabisky also proposed IQ tests for all 11-year-olds to help distribute money to schools, based on variation in intelligence rather than the economic background of their parents - an idea that Cummings described as “reasonable”, although “politically untouchable” unless a research programme on education and IQ could be launched.

It is understood several Tory politicians from black and minority ethnic backgrounds had made representations to No 10 about how the row of Sabisky’s appointment was damaging for the party’s relations with the black community.

One Conservative MP from a BME background said: “I’m not necessarily against hiring intellectually interesting people with sometimes controversial views, but this guy just doesn’t seem very smart, and if you are not very smart and at the very least appear bigoted that cannot be a good look for the party. By all means we should be against ultra-woke nonsense, but we should also stand against alt-right nonsense too.” Another said No 10’s refusal to take a clear line on accusations of racism was “severely damaging” to its standing with voters.

At least one Tory special adviser had also threatened to boycott meetings where Sabisky was present.

Dr Adam Rutherford, a geneticist and author, accused Sabisky and Cummings of being “bewitched by science, without having made the effort to understand the areas he is invoking, nor its history”.

He said the “moral repugnance” of the remarks was “overwhelming”, adding: “I am all for scientifically minded people advising government ... [but] this resembles the marshalling of misunderstood or specious science into a political ideology. The history here is important, because this process is exactly what happened at the birth of scientific racism and the birth of eugenics.”

After some of Sabisky’s controversial writings were highlighted, No 10 was asked at its regular Monday morning press briefing to clarify whether Johnson believed in eugenics or that black people had on average lower IQs than white people. Johnson’s deputy official spokesman declined to comment beyond saying: “The prime minister’s views are well publicised and well documented.” Asked repeatedly to point to where Johnson’s views were documented, he declined to answer.

The spokesman also distanced No 10 from the remarks of Grant Shapps, the transport secretary, who said over the weekend that Sabisky’s comments were “not my views and those are not the views of the government”, saying the cabinet minister was speaking only for himself when he made that statement.