The United States and five other countries agreed to new talks with Iran on Tuesday, offering a diplomatic path to resolving the Iranian nuclear crisis after months of bellicose rhetoric that roiled markets and sparked fears of a new Middle Eastern war.

European Union officials in Brussels formally accepted an Iranian proposal to restart negotiations on its nuclear program, clearing the way for the first such meeting in more than year. The Obama administration cautiously welcomed the plan for talks but said the onus was on Iran to prove its sincerity.

“We will have a pretty good sense fairly quickly as to how serious they are,” President Obama told a news conference hours after the talks were announced. He called on Iran to agree to steps that would “provide the world with assurance that they’re not pursuing a nuclear weapon.”

“And they know how to do that,” he added.

The new talks — which are expected to begin within weeks — would be the most significant de-escalation of a crisis that has been gathering steam since November, when U.N. nuclear officials publicly confronted Iran with allegations about past nuclear-weapons research.

Since then, Western countries have hit Iran with increasingly stringent economic sanctions and warnings of possible military strikes, while Iran has threatened to shut down international shipping lanes in the Strait of Hormuz.

E.U. foreign affairs chief Catherine Ashton notified Iranian officials in a letter that world powers were prepared to begin a “sustained process of dialogue aimed at producing concrete results.”

The talks would include the five permanent members of the U.N. Security Council — the United States, Britain, France, Russia and China — as well as Germany.

“Our overall goal remains a comprehensive negotiated, long-term solution which restores international confidence in the exclusively peaceful nature of Iran’s nuclear program,” Ashton wrote in the letter to Saeed Jalili, the secretary of Iran’s Supreme National Security Council.

Jalili had raised the possibility of a meeting in a letter to E.U. officials last month, prompting weeks of discussions among U.S. and allied countries over whether the offer was sincere.

Ashton warned the Iranians in her letter that they must “engage seriously and without preconditions,” wording that reflected Western concerns that Iran might seek to use negotiations to divide its adversaries and buy more time to build up its enriched-uranium stockpile.

A successful resumption of talks would represent a victory for the Obama administration, which mobilized dozens of countries in an effort to apply economic and political pressure on Iran. Obama has meanwhile pressed Israel not to launch a military strike against Iran’s nuclear facilities, arguing that economic sanctions could yet result in a diplomatic solution.

At the White House news conference Tuesday, Obama vigorously defended his dual-track policy of sanctions and diplomacy, and he scolded his would-be Republican rivals for what he termed “casual” talk about taking the United States to war with Iran.

“This is not a game, and there’s nothing casual about it,” Obama said. “And, you know, when I see some of these folks who have a lot of bluster and a lot of big talk, but when you actually ask them specifically what they would do, it turns out they repeat the things that we’ve been doing over the last three years.”

He credited his strategy of escalating economic pressure for helping bring Iran to the negotiating table, and he reiterated his determination to use force if necessary to prevent Iran from acquiring nuclear arms.

As the president was speaking, three GOP presidential contenders continued to blast Obama’s Iran strategy in speeches before the American Israel Public Affairs Committee, the influential lobbying group that Obama addressed earlier in the week.

Mitt Romney, Rick Santorum and Newt Gingrich each accused the White House of weakness in trying to thwart Tehran’s nuclear ambitions.

The decision to resume talks does pose political risks for the administration, diplomats and security experts say. Obama was criticized early in his presidency over his failed efforts to woo Iranian leaders with offers of improved relations with Washington.

Patrick Clawson, director of the Iran Security Initiative at the Washington Institute for Near East Policy, said negotiators must quickly extract agreements from Iran on “confidence-building measures,” such as a halt in Iran’s production of a purer kind of enriched uranium. During the last round of negotiations in the Turkish capital, Iranian officials refused to even discuss their country’s nuclear activities, he noted.

Other Middle East experts said the Western powers had little to lose by sitting down with Iran.

“Not having negotiations with Iran has not stopped their program from advancing,”said Joel Rubin, a former State Department official and director of policy for the Ploughshares Fund. “Negotiations will enable us to test Iranian intentions while keeping focused on the overall objective of preventing Iranian acquisition of a nuclear weapon.”

The decision to resume talks came hours after Iran, which says its nuclear program has only peaceful purposes, announced plans to open a key military base to nuclear inspectors. In statements reported on state media, Iranian officials also restated their interest in new negotiations.

Ali Asghar Soltanieh, Iran’s ambassador to the International Atomic Energy Agency, also said Iran was “adamant” in wishing to continue cooperating with the Vienna-based nuclear watchdog organization.

IAEA officials were twice refused permission to visit the military complex known as Parchin, a facility 18 miles southeast of Tehran that Western intelligence officials believe housed some of Iran’s past nuclear-weapons research.

Soltanieh said on Tuesday that U.N. experts would be allowed in only after clear agreements are reached on resolving other points of contention between Iran and the U.N. atomic body.

Iran’s leaders say they fear that visits to military sites are a cover for espionage and possible covert military operations.

“Imagine that we would constantly demand access to U.S. aircraft carriers and nuclear submarines,” said Sadollah Zarei, a columnist for the hard-line state newspaper Kayhan. “Naturally that would be a long debate.”

Erdbrink reported from Tehran. Staff writer Debbi Wilgoren contributed to this report.