Former US president Jimmy Carter during his visit to the Barzilai hospital in Israel. Photograph: Sebastian Scheiner/AP

The former US president Jimmy Carter said yesterday that the leaders of the Islamist movement Hamas would accept a two-state peace agreement with Israel as long as it was approved by a Palestinian referendum or a newly elected government.

Carter - who spoke in Jerusalem after meetings with Hamas figures in the West Bank, Cairo and Damascus - said they had told him they would support the results of a referendum or election on a final status peace agreement negotiated by the Palestinian president, Mahmoud Abbas, even if Hamas itself opposed the agreement.

But Carter admitted failure in convincing Hamas to begin a unilateral ceasefire in Gaza, the scene of continued violence.

"If President Abbas succeeds in negotiating a final status agreement with Israel, Hamas will accept the decision made by the Palestinian people and their will through a referendum ... or by a newly-elected Palestinian national council ... even if Hamas is opposed to the agreement. Verbatim, this is their language," he said in a speech at the King David hotel.

He insisted he was not acting as a mediator and he noted his visit was not endorsed by either the Israeli or the US government, so there was little sign it would advance the so far fruitless Middle East peace talks between Abbas and the Israeli prime minister, Ehud Olmert.

Carter acknowledged that Hamas still refused to renounce violence, to recognise explicitly Israel's right to exist, or to recognise previous peace accords. The movement refused to speed up the release of Gilad Shalit, an Israeli corporal captured two years ago, though it did tell Carter it would let the soldier write a new letter to his parents to prove he was still alive.

While Carter condemned attacks by Hamas as "despicable" and "acts of terrorism" in his speech yesterday, he sounded encouraged by his talks, which included meetings with the most powerful Hamas leader in Gaza, Mahmoud Zahar, and its exiled head, Khaled Meshal.

"They said they would accept a Palestinian state on the 1967 borders if approved by Palestinians and they would accept the right of Israel to live as a neighbour next door in peace, provided the agreements negotiated by prime minister Olmert and President Abbas were submitted to the Palestinians for their overall approval, even though Hamas might disagree with some terms of the agreement," he said.

In Damascus, Meshal appeared to confirm Carter's version. He said: "We agree to a state on pre-67 borders, with Jerusalem as its capital with genuine sovereignty without settlements but without recognising Israel." Hamas would "respect Palestinian national will even if it was against our convictions".

One Hamas spokesman in Gaza cast doubt on Carter's words. Sami Abu Zuhri said the idea of a referendum on a peace agreement "does not mean that Hamas is going to accept the result of the referendum".

Hamas's position on forging a final status peace deal is based on a key agreement it signed two years ago with its Abbas-led rival, Fatah. But the Prisoners' Document was overtaken by a near civil war between the two rival groups. The Hamas leaders also told Carter that a "national reconciliation" between Hamas and Fatah was necessary for any peace agreement to work, even though the two sides appear a long way from a rapprochement.

Carter said it was widely acknowledged on the ground that little progress so far had been made under the current peace talks, which were launched in Annapolis, US, last November. "Since Annapolis the peace process has regressed," said Carter, citing the continued growth of Jewish settlements in the West Bank and Israel's economic blockade of Gaza.

He argued that there should be talks with Hamas in order to resolve the Middle East conflict. "We believe the problem is not that I met with Hamas in Syria," said Carter. "The problem is that Israel and the United States refuse to meet with these people, who must be involved."

Backstory

Carter's nine-day visit to the Middle East was more important for who he met than for what he achieved. He held hours of talks with senior Hamas leaders whom other international diplomats, including officials from the United States, the European Union and the UN, are not meeting. Carter helped negotiate the key 1979 peace treaty between Israel and Egypt. But he said he did not want to mediate again, rather to point out that he believes it is a mistake to exclude Hamas and Syria from talks. Israel disagrees. Prime minister Ehud Olmert did not meet Carter or approve of his plans. He said: "He has come at an inappropriate time, with an irrelevant agenda."