Sweden’s housing minister has resigned following a week of mounting controversy over his contacts with Islamic organisations and Turkish ultranationalists, piling further pressure on the country’s already unpopular minority coalition government.

The Social Democrat prime minister, Stefan Lofven, said Turkish-born Mehmet Kaplan, a member of the junior coalition partner Green party and former spokesman for Sweden’s Muslim Council, had submitted his resignation and that he had accepted it.

Sweden’s centre-left coalition of Social Democrats and Greens has been severely strained by Europe’s migration crisis, with the arrival of about 160,000 asylum seekers in the country last year forcing Stockholm to impose border controls and tighter rules in a U-turn on decades of generous refugee policies.

Kaplan, 44, denied any wrongdoing and said he was stepping down because public and media criticism was making it impossible for him to do his job. He said he opposed “all forms of extremism, whether nationalistic, religious or in any other form” and supported “human rights, democracy and dialogue”.

The minister, who was born in Turkey and arrived in Sweden at the age of eight, has come under increasing pressure after local media last week published photos of him at a dinner with Turkish ultranationalists, including the Swedish head of the extremist Grey Wolves organisation, and a former leader of the main Turkish nationalist group in Sweden, who was forced to resign earlier this month after calling on Turks to kill “the Armenian dogs”.

The minister was further attacked for his links to a number of Islamic organisations, including the international Millî Görüş movement, that some suspect of promoting religious fundamentalism. Kaplan has acknowledged the ties, but said they “don’t mean I agree with them on everything”.

The pressure increased at the weekend when Swedish media published seven-year-old footage of him comparing Israel’s policies towards Palestinians to the Nazis persecution of the Jews.

The Svenska Dagbladet daily quoted him as saying in March 2009, before he became a minister, that “Israelis treat Palestinians in a way that is very like that in which Jews were treated during Germany in the 1930s”.

The comments drew heavy criticism from Israel’s ambassador to Sweden, Isaac Bachman, who described them as “deeply antisemitic”, and Sweden’s foreign minister, Margot Wallström, who said they were “terrible”.

Kaplan conceded he had “on several occasions severely criticised the actions of the state of Israel”, but said he was “clearly not antisemitic”. Relations between Sweden and Israel have been poor since 2014, when the coalition government recognised the Palestinian state.