Iran has asked Turkey to help it resolve its 30-year dispute with the US as a possible prelude to re-establishing ties, the Turkish prime minister, Recep Tayyip Erdogan, has told the Guardian.

Iranian officials made the request while George Bush was in office, Erdogan said, adding that he had passed the message to the White House at the time. He said he was considering raising the matter with Barack Obama, who has said he wants to engage with Iran at a G20 summit in London in April.

Speaking aboard his prime ministerial plane during a local election campaign trip to the south-eastern city of Mardin, Erdogan also renewed his criticism of Israel's recent offensive in Gaza and challenged the Israeli prime minister-designate, Binyamin Netanyahu, to recognise Palestinians' right to have their own state.

Asked if Turkey could play a mediating role in overcoming mistrust between Washington and Tehran, Erdogan replied: "Iran does want Turkey to play such a role. And if the United States also wants and asks us to play this role, we are ready to do this. They [the Iranians] said to us that if something like this [an opportunity for rapprochement] would happen, they want Turkey to play a role. These were words that were said openly. But I have told this to President Bush myself."

Erdogan's remarks came as the US state department finally appointed the veteran Clinton administration diplomat Dennis Ross as a special envoy responsible for tackling the difficult Iran issue. Ross, whose experience has been in dealing with the Israeli-Palestinian conflict, has been given the title of special adviser to the Gulf and south-west Asia. In an article published last September, Ross advocated that the initial approach to Iran should be through a "direct, secret back channel".

Iran and Turkey have drawn closer in recent years, helped by growing trade links last year estimated at £5.5bn. Iran's president, Mahmoud Ahmadinejad, met Erdogan and the Turkish president, Abdullah Gul, in Istanbul last August, and several Turkish officials have also visited Iran in recent months to boost economic ties. Turkey imports one-third of its natural gas from Iran and has signed preliminary agreements to invest heavily in the Iranian gas industry.

US officials have previously reacted sceptically to Turkish proposals to mediate with Iran. However, the idea may be given fresh consideration by the Obama administration, which has set up a sweeping policy review policy after the president promised to reach out if Iran "unclenched its fist".

Turkey, a Nato member and close ally of the US, shares Washington's misgivings about Iran's nuclear programme, which Tehran insists is for peaceful purposes but which the west suspects is aimed at building an atomic bomb.

Acting as a go-between for Iran would fit with the regional mediator role Turkey has fashioned for itself under Erdogan's Islamist-rooted Justice and Development party (AKP) government. Last year, Ankara brokered peace talks between Israel and Syria, using its western alliance membership and status as a Muslim country to win the trust of each side.

But Turkey's ties with Israel were severely strained by Erdogan's fierce criticism of the recent bombardment of Gaza, which left more than 1,300 Palestinians dead. Relations soured further after he stormed out of a debate at the world economic forum in Davos after clashing angrily with the Israeli president, Shimon Peres. The gesture was widely acclaimed in Turkey and throughout the Muslim world but was condemned in Israel, where Erdogan was seen as an apologist for the Palestinian militant group Hamas, with which his government has cultivated ties.

However, in comments likely to provoke further anger, Erdogan drew parallels between Hamas's failure to recognise Israel and the refusal of Netanyahu, who has been asked to form the next Israeli government, to endorse a Palestinian state. "We are always telling them [Hamas)]to act differently, that we are for a two-state solution: Palestine and Israel," he said. "They have to accept this, but Israel also has to accept Palestine.

"Is Israel right now accepting Palestine? They are still not accepting them. But it is being expected of the Palestinian people to accept Israel. Now go and ask Mr Netanyahu if he is accepting Palestine."

Netanyahu has pledged to pursue "economic peace" with the Palestinians but has ruled out territorial concessions that would lead to statehood.

Erdogan said an Israeli-Palestinian settlement had to include Hamas, which he called the party of "change and reform". He also condemned Israel's recent onslaught as disproportionate. "Hamas doesn't have any planes. Hamas doesn't have any tanks or artillery, and with the use of disproportionate force Gaza was being put under fire," he said. "One thousand, one hundred and 30people have died. We have more than 5,500 injured. Who is going to ask: what has happened here and who is going to pay the price for this?"

His walkout at Davos, when he also clashed with the debate moderator, David Ignatius of the Washington Post, was inspired by his conscience, he said, and a desire to "be the voice of the voiceless and the protector of the people who cannot protect themselves".

Erdogan dismissed fears that the US pro-Israel lobby would retaliate by lifting its opposition to a congressional resolution recognising the Armenian genocide claims. During last year's US presidential election campaign, Obama and his vice-president, Joe Biden, voiced support for the resolution.

But Erdogan said: "I believe the United States feels and knows the importance of Turkey within the region more than some people who do not understand this. The so-called Armenian genocide is not an issue that can affect Turkey-American relations in a very strong way. I don't believe the US Congress would take a decision based on emotions. It should be left to historians."

Allegations by the Armenian government and diaspora about the fate of their people under the Ottoman empire have long been one of Turkish society's biggest taboos. Turkey vehemently disputes Armenian claims that up to 1.5 million were deliberately killed in a programme amounting to genocide. Officials say the death toll was much lower and a result of inter-ethnic clashes in which many Turks also died. Turkey has called for a historical commission to examine the issue and has recently pursued rapprochement with Armenia, with which it has no diplomatic ties.