Barack Obama’s presidency was only hours old when a fierce debate erupted among top Iranian officials over the new U.S. leader and his offer to “extend a hand” to the Islamic republic. Hard-liners suspected a trick, convinced that Obama was no different from his predecessor, but others saw potential for a long-sought diplomatic thaw.

“It created real hope inside Iran,” recalled Seyed Hossein Mousavian, a former senior Iranian Foreign Ministry official and witness to the internal rift over Obama’s 2009 inaugural speech. “The question was whether he could deliver.”

Both sides misjudged Obama, who has proceeded to chart a course with Iran that is neither fully conciliatory nor bellicose. Over the previous few years, the president has used his office to repeatedly extend offers of rapprochement to Iranian leaders. And when those attempts have been rejected — firmly — he has used diplomacy to build an unprecedented wall of international opposition to Iran’s nuclear program and preside over the imposition of the harshest economic sanctions in the country’s history.

At the same time, the Obama White House has proven to be no more successful than its predecessors at halting Iran’s nuclear advance, the singular goal that has driven U.S. policy on Iran since the George H.W. Bush administration. Indeed, Iran’s rate of production of enriched uranium has nearly tripled since Obama took office, while hopes that the president can deliver a solution to the crisis have faded, even among his former admirers in Iran.

“This hand that was stretched out to us turned out to be covered in iron,” said Mousavian, the Iranian diplomat.

As Obama nears the end of his first term, the mixed results of his Iran policy have provided ammunition for supporters — who point to the president’s unparalleled success in uniting the world against a nuclear Iran — but also for his chief political rival, Republican Mitt Romney, who has pounded the White House for failing to halt Iran’s march to a nuclear-weapons capability and accused the president of abandoning Israel, the United States’ top ally in the region.

The Iran record offers unique insights into Obama’s use of power in dealing with an intractable foreign policy challenge that threatens to dominate the agenda of whoever occupies the White House in 2013. On Monday, at the U.N. General Assembly, Iranian President Mahmoud Ahmadinejad remained defiant in the face of calls for his country to curb its nuclear program and suggested that the United States was being bullied by Israel. Obama is expected to address the issue in remarks before the United Nations on Tuesday.

For now, the Obama administration is seeking to further increase the pain for Iran, responding in part to pressure from Israel and from Congress, which has consistently urged harsher measures, including some that U.S. officials fear could hurt allies as well as Iranians. Although sanctions rarely work, independent analysts say a groundswell of economic unrest could force the regime to make concessions if it sees its survival at risk.

“Two clocks are now running: a nuclear clock and regime-change clock,” said Clifford Kupchan, a former State Department official who now serves as a private consultant on the Middle East. “Sanctions have put a big hole in the revenue side of Iran’s budget, but the leadership doesn’t yet know that it’s on a cliff.”

“So are sanctions changing the nuclear program? No,” Kupchan said. “Are they buying time so the regime-change clock can run down? I’d say yes.”

Aiming to shift the dynamic

Ironically, as the Obama White House winds down its first term, it finds itself in a similar place on Iran as the George W. Bush administration did in its final months: grappling with a belligerent regime locked on a course of nuclear expansion, impervious to U.S. threats, coercion or diplomacy. It is hardly the outcome that Obama’s policy advisers envisioned when the Democrat took office promising to overturn three decades of hostile relations with the Islamic republic.

As a presidential candidate, Obama determined early that Iran would be a top priority, former and current administration officials say. Then a senator, Obama had made nuclear nonproliferation one of his signature issues, and he came to regard Iran’s nuclear program as deeply destabilizing, not only to Middle East security but also to the international nonproliferation standards that had contained the spread of nuclear weapons throughout the second half of the 20th century, according to several of his top advisers.

“He felt he had to change the dynamic on Iran quickly,” said Dennis Ross, a top Iran official in the Obama White House until late last year. “If he didn’t succeed, there was a high chance that the issue would impose itself.”

At the time, relations with Iran were at their lowest level since the late 1970s. President George W. Bush had labeled Iran part of an “axis of evil” and launched wars against two of Iran’s neighbors during his first term. In his second term, the State Department had sought to engage Tehran diplomatically, but its efforts drew skepticism, even among European allies.

Obama took steps to change the dynamic. He appealed to Iran implicitly in his inaugural address, and two months later, he spoke directly to Iranians in a televised speech marking Iran’s Nowruz holiday and in a personal letter sent through diplomatic channels to the country’s supreme leader, Ayatollah Ali Khamenei.

“To the Muslim world, we seek a new way forward, based on mutual interest and mutual respect,” Obama had said in his Jan. 20, 2009, speech. “We will extend a hand if you are willing to unclench your fist.”

Khamenei publicly rejected Obama’s appeals, and U.S. conservatives derided his overtures as both naive and a reflexive rejection of Bush administration policies. “It was informed by ‘Bush derangement syndrome’ — a belief that if President Bush touched it, it must be wrong,” said Danielle Pletka, vice president for foreign and defense policy studies at the American Enterprise Institute, a conservative Washington think tank.

But Ross, a veteran diplomat who met repeatedly with Obama as he devised his Iran strategy, said Obama was realistic about the chances for a diplomatic breakthrough.

“He was never starry-eyed. We never expected that the Iranians would just agree to talk and sing ‘Kumbaya,’ ” Ross said. “But there was a sense that we had to see what was possible. And if engagement was not possible, we needed a way to demonstrate to the world, unmistakably, that the problem was not with the United States, but with Iran’s behavior.”

Support for sanctions

History would quickly intervene to put Iran’s actions in an even harsher light. In June 2009, Iranian authorities launched a brutal crackdown against hundreds of thousands of young Iranians who took to the streets to protest alleged vote-rigging in the reelection of Ahmadinejad. Muslims around the world recoiled at YouTube videos showing Iranian police beating and even killing unarmed demonstrators.

Then, that September, the Obama administration revealed the existence of a hidden uranium-enrichment plant near the Iranian city of Qom. The discovery of the plant — concealed inside a fortified mountain bunker — all but demolished Iran’s claim that it was interested only in developing peaceful nuclear energy under U.N. oversight.

In the months that followed, Obama saw a chance to unite the U.N. Security Council behind tough new economic sanctions that would isolate Iran diplomatically and pressure its leaders to accept a deal, former and current administration officials said.

“There was high-level, personal involvement” by Obama in lobbying Russian and Chinese leaders to support sanctions, recalled a senior administration official who participated in meetings and phone calls in which the sanctions were discussed. “We wanted to achieve the maximum, and Russian and Chinese help was crucial,” said the official, who spoke on the condition of anonymity to describe diplomatic deliberations.

The U.N. sanctions, approved in June 2010, were only the opening salvo in a pressure campaign that would continue to gather steam over the following two years. Goaded at times by Congress, the White House enacted unprecedented restrictions on international commerce with Iran’s petroleum, shipping and banking sectors. The European Union adopted nearly identical measures and then went even further, imposing an unprecedented embargo on Iranian oil, effective July 1, 2012.

Although Iran has weathered sanctions in the past, independent analysts say the impact this time has been staggering. Oil exports have plummeted by a third, forcing Iran to shut down oil wells and close petrochemical plants, depriving the country’s economy of billions of dollars each month. Iran’s currency, meanwhile, is in free fall, driving up food prices and jobless rates throughout the country.

While remaining defiant, Iranian officials have been forced to acknowledge the sanctions’ severe impact.

“There are some problems in selling oil, and we are trying to manage it,” Ahmadinejad said in a rare admission on state television. He then accused the Obama administration and its allies of waging an “all-out, hidden, heavy war” against Iran.

Elusive diplomatic solution

Without question, the administration’s pressure campaign has sharpened Iran’s choices and dramatically raised the cost of its nuclear program. In addition to new sanctions, Obama has sold billions of dollars in military hardware to Iran’s rivals in the Persian Gulf region, while also authorizing the expansion of a secret campaign to disrupt Iran’s uranium production through cyberattacks and other covert means. Both strategies built on policies begun under President George W. Bush.

At times, a diplomatic end to the nuclear crisis has appeared tantalizingly close. On at least three occasions, various sides have floated a possible “grand bargain” that would result in Iran eliminating a substantial portion of its uranium stockpile in exchange for Western technology and eventual sanctions relief. The latest proposal, discussed during three rounds of international nuclear talks over the spring and summer, was rejected by Iranian officials.

But the Obama administration’s performance in the talks also drew criticism, not only from Israelis and conservatives but also from liberals who accused the White House of refusing to bargain seriously with Iran because of political risks in an election season.

“After being burned initially, Obama went into election mode,” said Trita Parsi, an Iranian national and author of “A Single Roll of the Dice,” a book critiquing Obama’s Iran policy. “When it comes to Iran, the maneuvering space is always minimal because of politics. But you have to break eggs to make an omelet.”

No firm dates for new negotiations have been set, and Middle East analysts say no breakthrough is likely until after the November election. Meanwhile, Iran’s success in adding thousands of centrifuge machines to its underground facility — and the inexorable growth of its uranium stockpile — continues to stoke fears of an Israeli airstrike. It has also left the White House vulnerable to Republican charges that administration policies, while well-intentioned, have ultimately been fruitless.

“The administration says, ‘Judge us by how effective our sanctions are,’ but that’s the wrong measure,” said Elliott Abrams, a former senior adviser on the Middle East to the George W. Bush administration and a frequent Obama critic. “The question is, how many more centrifuges does Iran have now, compared to where they were in 2009?”

White House officials insist that any proper assessment of Obama’s performance on Iran must also include a consideration of what has not happened in the Persian Gulf under his watch. Despite setbacks and disappointments, advisers note, the president has hewed to a course of steadily increasing pressure while seeking to discourage what he once derided as “loose talk” of another U.S. military campaign in the Middle East.

“The president has made an assurance that he will prevent Iran from making a nuclear weapon, and his record bears out that he will do what he says,” said Ben Rhodes, a deputy national security adviser to the White House. For now, at least, “the best way to do that is through diplomacy.”