Jimmy Carter arrived in mid Wales for his speech on Sunday
Former US president Jimmy Carter has called for a clear deadline for the withdrawal of US troops from Iraq.
Mr Carter, who now spends much of his time in international diplomacy, also called for increased communication with Iran over fears that the country is planning nuclear proliferation.
The 83-year-old, speaking at the Hay Festival in Powys, also deplored the situation in Gaza.
He claimed 1.6m Palestinians were living in a "prison".
He said many countries were behaving in a "supine" manner as people in Gaza were being systematically denied basic food and sustenance.
Mr Carter, who gave a lecture at the literary festival later on Sunday, was questioned on whether he agreed with US presidential candidate Barak Obama's promise to withdraw US troops from Iraq within 16 months.
He said he could not speak for Mr Obama but said there should be a three-step process of US withdrawal from Iraq.
Mr Carter, a fierce critic of the war, said the Americans should notify Iraq's leaders that they would leave at a certain date.
"I don't care if it's one year or five years....the essence of it is to let the world know that...we are going to be out," Mr Carter told journalists.
The next stage he said would be to assure Iraqis that they would have complete control over their political, military and economic affairs, including oil.
Finally, Mr Carter said there was a need "to marshal help from other nations in rebuilding the destruction that we have perpetrated on Iraq unnecessarily" so that the Iraqi people know they can stand on their own.
Mr Carter, whose presidency floundered in the Iranian hostage crisis in the late 1970s, also called for a major diplomatic effort to resolve issues around Iran's enrichment of nuclear materials.
He said Iran had never violated any nuclear proliferation treaty and any testing of weapons could never be done in secrecy.
Referring back to his time as president he said even in the darkest days of the crisis he had made all efforts to build diplomatic bridges with Iran's revolutionary government.
He had even approached the heavyweight world boxing champion Muhammad Ali, an Islam convert.
Mr Carter said Iranians had a right to enrich uranium for peaceful purposes but he understood the concerns that it raised in Israel.
He added: "The US should say 'we want to be your friend'".
Mr Carter said they should normalise trade relations with Iran.
"We want to help with technology to build a peaceful nuclear programme," he added.
The ex-president, whose Carter Centre has monitored 70 elections around the world, was highly critical of the international failure to recognise the result of the recent Palestinian election won by Hamas.
He said that the US, Israel and other countries have lined up behind Hamas' opponents Fatah.
One of his central political motivations in Middle East diplomacy had always been to help Israel secure a peaceful co-existence with its neighbours.
The veteran Middle East negotiator pulled off the historical Camp David Accord between President Sadat (Egypt) and Begun (Israel) and is a winner of the Nobel peace prize.
He said $2bn of US aid had gone to the Palestinians in 2007 and this was having the effect of strengthening Fatah.
Mr Carter said the present Palestinian government was a "subterfuge" not based on elections and was appointed, not elected, while large numbers of Hamas supporters remained in Israeli prisons.
But he said his recent book on Palestine had prompted a massive response and he believed that the desire for peace in the Middle East was strengthening on all sides.