Sweden’s housing minister has stepped down amid mounting controversy over comments that emerged of him likening Israel’s treatment of Palestinians to the persecution of Jews in Nazi Germany.

Mehmet Kaplan, a 44-year-old Green Party member and former spokesman of Sweden’s Muslim Council, denied any wrongdoing, adding he was stepping down due to public and media criticism interfering with his ability to perform the job.

He also faced questions over his contacts with Islamists and ultra-nationalists from Turkey.

"Let me be clear: This is not a confirmation of reports about me that I consider wrongful. I know who I am and what I have done," Mr Kaplan told reporters in Stockholm.

The controversial comments were published in the daily newspaper Svenska Dagbladet, who reported him as saying: “Israelis treat Palestinians in a way that is very like that in which Jews were treated during Germany in the 1930s”.

Turkish-born Mr Kaplan made the comments seven years ago and before he entered the newly formed centre-left government to represent the minor coalition partner the Green Party in 2014.

He also came under pressure last week after Swedish media published photos showing him dining with Turkish Swedish leaders, including the local leader of the Gray Wolves, an ultra-nationalist group.

Kaplan said he didn't know the person in question and distanced himself from the group, but soon found himself on the defensive again, as media reported that he had met representatives of a Turkish Islamist organization on several occasions.

Prime Minister Stefan Lofven, who accepted the minister’s resignation, called Mr Kaplan "a man with humanist and democratic values" but said his decision to step down was correct after an "overall assessment" of the situation.