He came to New York. He saw almost everyone. Hassan Rouhani, Iran’s new president, may not have conquered, but at least he seems to have persuaded John Kerry and Barack Obama that his proposals for negotiating an end to the US-Iran conflict deserve to be taken seriously. When President Obama picked up his phone in the Oval Office on Friday to bid farewell to President Rouhani with the Persian phrase Khodahafez (“God be with you”), there was the sense that a tectonic shift between Washington and Tehran was taking place.

The Rouhani blitz was regarded by many cynics as nothing but a charm offensive. Of course, in one sense that is what it was. Rouhani dominated the media, with half a dozen one-on-one interviews, a well written and conciliatory op-ed in the Washington Post, a seemingly endless series of meetings with curated groups of journalists, scholars, former US government officials, business executives, and a throng of his fellow Iranians, many of whom had taken refuge in the United States from the regime he represents. He spoke to the UN General Assembly (the ostensible purpose of his visit), to the Non-Aligned Movement (which Iran chairs), and to a collection of some two hundred members of the Asia Society and the Council on Foreign Relations at a midtown hotel.

I watched him in the two meetings that I attended and in most of his televised appearances. Rouhani is a man of considerable gravitas. He is serious, businesslike, and fully in command of his brief. Except for the formal speeches, he spoke without notes and responded directly and thoughtfully to the many questions directed at him. He spoke in Persian, except for an occasional English phrase, but he listened to his English-speaking audience without simultaneous translation, and his responses indicated that he grasped not only the words but also the nuances. Rouhani is a cleric, and he wears the robes and turban appropriate to his status. But he prefers to be addressed as Doctor Rouhani, in recognition of his PhD in law from Glasgow Caledonian University. Addressing members of New York think tanks, he reminded them that until recently he was one of them, running the Center for Strategic Research in Tehran. That, however, is only a small part of his résumé.

He was national security adviser to presidents Rafsanjani and Khatami, and he has been the personal representative of the Supreme Leader, Ayatollah Ali Khamenei, for nearly a quarter of a century. In those capacities, and other senior posts, he has been associated with virtually every security and foreign policy decision made by the Islamic Republic of Iran since at least the end of the Iran-Iraq war in the late 1980s. Rouhani’s close ties to Khamenei were on display as he prepared to depart for the United States. Khamenei appeared before the leadership of the powerful and conservative Revolutionary Guards Corps to remind them politely but firmly that their proper concern was national security, not politics. Since the Revolutionary Guards played a major part in undermining both of Rouhani’s predecessors, this was a unique and unequivocal demonstration of solidarity. It does not, however, guarantee indefinite support for Rouhani’s initiatives. The Guards and the senior clerical establishment will look for results and weigh their own interests. Thus far, Rouhani, with the help of the Leader, has stayed ahead of his domestic and foreign opposition, but in New York he and his associates gave every indication of being men in a hurry.

Rouhani’s decisive win in the June 2013 elections was not a result of his foreign policy experience. Rouhani was correctly perceived by many Iranians as the anti-Ahmadinejad. During his presidency, Ahmadinejad not only inflamed international sentiment against Iran with his belligerent rhetoric, associating himself with ugly conspiratorial thinking that doubted the Holocaust and speculated that the United States itself was responsible for 9/11, but he also surrounded himself with ideologues whose nativist convictions far exceeded their experience in both domestic and international affairs, leading to his country’s acute isolation and a stifling regime of economic sanctions.

In the eyes of many Iranians, he also very nearly wrecked the economy by rejecting the advice of virtually every responsible economic voice in favor of his own eccentric and inflationary whims. In 2007, Ahmadinejad impulsively dissolved Iran’s Management and Planning Organization (MPO)—the Iranian version of the Office of Management and Budget in the United States—because it clashed with his populist agenda. By the end of his term, and starting well before the worst of the recent international sanctions, Iran’s inflation rate had risen to one of the highest in the world. One of Rouhani’s earliest pronouncements was to reestablish the MPO. Ahmadinejad was also associated with the harsh crackdown on civil liberties following his disputed 2009 reelection, whereas Rouhani was regarded as sympathetic to the more tolerant policies of former president Khatami, whose strong endorsement of Rouhani during the campaign was crucial to his victory.

In the thirty-four years since the Iranian revolution, the Islamic government has lost much of the legitimacy it once enjoyed among large swathes of the population. In recent years—and particularly since the large-scale street protests of 2009—Iran’s leadership has instead relied on repression to preserve its strength. The government’s poor economic management, in turn, has amplified the perception among many Iranians that the system is no longer working. Iran has good universities that produce talented graduates. It has an entrepreneurial culture that seeks innovation. It has a well-developed industrial base, and at least until recently, it has had the benefit of huge oil revenues. Iran produces much of its own armament, including even mini-submarines, as well as sophisticated electronics.

Yet in recent years, few of the country’s 76 million people have benefited from these resources. Job growth has stagnated, inflation has destroyed purchasing power and savings, and control of the economy has moved increasingly into the public sector. Typically, those at the top who control economic and currency policies are the ones who benefit. The middle and lower classes have suffered the most, despite Ahmadinejad’s efforts to spread the wealth via direct payments to every Iranian family. Members of the younger generation find it dauntingly difficult to find jobs. Reluctantly, many leave.

As a candidate, Rouhani appealed to ordinary Iranians who felt that the Islamic Republic needs major reforms, with policies based more on pragmatism and talent rather than ideology and connections. He does not fit the classic profile of a transformative leader. He is a consummate insider positioning himself as an outsider. That raises suspicions in the West, but it also means that he knows how to get things done. It is too early to tell if he can pull Iran out of the immense hole left by his predecessor.

It is easy to forget that President Rouhani and his foreign minister, Javad Zarif, have long experience negotiating with the West. Zarif headed Iran’s cooperative efforts with the United States in 2001 that resulted in the installation of the Karzai government in Afghanistan. That brief period of intense and fruitful collaboration ended after only a few months when President George W. Bush inexplicably denounced Iran as a member of the Axis of Evil.

Zarif was also directly involved in drafting what has come to be known as the Grand Bargain memo in 2003. This memo, which can be read online, spelled out Iran’s understanding of the demands of both the US and the Iranian sides. It is far-reaching and is based on the acceptance of direct discussion between the two countries. On the crucial subject of weapons of mass destruction, Iran offered “full transparency for security that there are no Iranian endeavors to possess WMD, full cooperation with IAEA based on Iranian adoption of all instruments” dealing with IAEA access and inspection. The United States never responded to this memo.

President Rouhani himself was Iran’s nuclear negotiator in 2003, when Iran suspended enrichment for nearly two years while engaged in talks with the Europeans. A number of participants in those negotiations have told me that the Europeans were unable to get the Bush administration’s approval, leading to their collapse. Both Zarif and Rouhani were later accused by hardliners in Iran of being naïve appeasers who mistakenly believed they could deal with the Americans. At that time, Iran was only beginning its nuclear program. A senior Iranian who was involved in those discussions told me this week that Iran in 2005, when discussions collapsed, was “willing to settle for two thousand centrifuges.” Today, after a decade of futile pressure and sanctions, Iran has more than 18,000 centrifuges.

So these two visitors from Iran have returned to offer a nuclear deal that bears more than a little resemblance to their offers of almost exactly a decade ago. Both bear the scars of their past engagement, which may help to explain the reluctance to rush into a very public handshake until they were more confident of a favorable US response to their overtures. Those doubts were apparently removed on Thursday, when US Secretary of State John Kerry met privately with Iranian Foreign Minister Javad Zarif, without even notetakers present. In an almost surrealist touch, Zarif gave his first account of the meeting to his president only an hour or so later in front of more than two hundred applauding Americans in a ballroom of the Hilton Hotel. That event was capped the following day by the telephone call between the two presidents, which was first reported to the public in Rouhani’s Twitter feed and then confirmed by President Obama in a public statement.

There is a long way to go, and each side will necessarily have to reexamine its maximalist positions in the course of what are certain to be difficult and complex negotiations. In addition to President Rouhani, the Iranian team is composed of graduates from the University of Denver (Foreign Minister Zarif), George Washington University (Chief of Staff Nahavandian), and MIT (IAEA Representative Salehi and Vice President Najafi), among others. This is the last generation of Iranian revolutionaries with deep knowledge of the West. As the Iranians emphasized in their private meetings, this favorable constellation of interests and individuals who are willing to take risks for détente in the wake of Rouhani’s unexpected electoral victory earlier this year can never be repeated. President Obama, himself a lame duck, may feel much the same way.

In the next few weeks, there will be a barrage of assertions by international officials and commentators that the Iranian offer is a sham and should be rejected. Some of those comments will come from Israel and from the US Congress, but there will be others from Saudi Arabia and the Arab monarchies, all of whom fear a US-Iranian rapprochement as a threat to their own narrow interests.

The history of US relations with Iran is littered with missed opportunities, almost always rejected for misguided domestic reasons on the part of either Iran or the United States. While it is regrettable that the current discussions are starting ten years late, both presidents seem to recognize that they are now urgent. The dramatic change in tone is an important first step and was unthinkable before this year’s Iranian election. But words are no longer sufficient. Both sides are preparing their presentations for the first serious negotiation of the new era in Geneva just two weeks from now. We shall see.