As battles raged last week between Israel and Islamist groups in Gaza and Lebanon, my mind flashed back to a conversation I had with a senior Iranian official in May.
"The United States has problems in Iraq, Lebanon, Syria, and Afghanistan," he said. "Iran is the one who can help (in all those places). The United States needs Iran's help, not confrontation."
When I asked what would happen if tensions between Washington and Tehran over Iran's nuclear program led to a U.S. military attack on Iran, the official swiftly replied: "I don't think the United States is in a position to think like that."
The message was clear: You Americans need us if you want to stabilize the region. But if you threaten us, we can make things much, much worse.
Flash forward to the outbreak of Mideast violence in recent days.
I recalled the Iranian's warning when fighters from the Iranian-backed groups Hamas and Hezbollah made separate incursions across Israel's southern and northern border, within two weeks of each other, to kidnap Israeli soldiers. Their timing was telling, just before the G-8 conference of the world's top industrial democracies in St. Petersburg, Russia, where the question of whether to push for U.N. sanctions against Iran was top of the agenda.
Suddenly, the G-8 agenda shifted from how the world community might press Iran to freeze its suspect nuclear program to how to prevent new Mideast wars from exploding.
Iran was delivering a warning to Washington via proxies, without firing a gun.
The Lebanese movement Hezbollah gets money, arms and guidance from Iran, and would not have conducted such a dramatic raid into Israel without at least consulting with Tehran. Israel claims the Hezbollah rockets that hit Haifa came from Iran.
As for Gaza's Hamas, it has leaders in the Syrian capital, Damascus, where they can consult with visiting Iranian officials. Iranian president Mahmoud Ahmadinejad has been courting support with the "Arab street" (whose Sunni Arabs are normally hostile to Persian Shiite Muslims) by spouting hard-line rhetoric about Israel.
Meantime, thanks to the United States, Iran can exert powerful influence in Iraq, where Shiite parties allied to Iran now run the government, and in Afghanistan, whose leaders are also close to Tehran. By ousting Saddam Hussein and the Taliban - Iran's greatest enemies - Washington made Iran into the superpower of the region.
The Iranians have become cocky; they believe that America's power in the Middle East has waned with its troops bogged down in Iraq. Just last weekend, Arab foreign ministers, most of whom deeply distrust Iran, trooped dutifully to a Tehran conference at which Iranian leaders told them that U.S. soldiers should leave Iraq.
Over and over, officials in Tehran told me that America must engage with, and recognize, them as the region's dominant power. This means abandoning the administration's former hopes of engineering "regime change" in Iran.
As Steven Cook of the Council on Foreign Relations puts it: "We've created an Iranian moment in the Middle East. ... Iran holds all the cards."
But an overconfident Iran seeking to tweak the United States is playing a dangerous game that could provoke a regional conflagration. I doubt the top Iranian leadership around Ayatollah Khamenei, the true power elite in Iran, wants such a war. They don't squelch Ahmadinejad's reckless war talk, but they deride him as lacking in power.
Radicals in Hamas and Hezbollah, on the other hand, are ready for such a war; Hezbollah's leader, Hassan Nasrallah, said as much on Friday. The United States - and Israel - must respond very carefully, lest they play into the radicals' hands.
Without delay, the White House must exert every effort to prevent the Lebanon crisis from getting out of hand. Israel's leaders had no choice but to respond to Hezbollah's cross-border raid. But bombing Lebanese civilian infrastructure, rather than Hezbollah military targets, is counterproductive.
Israel's leaders know that Lebanon's pro-American government hasn't the strength to disarm Hezbollah. President Bush needs to rally international support to strengthen that government and isolate Hezbollah.
Continued Israeli bombing of civilian targets may lead to the collapse of Lebanon's government while rallying Lebanese and Arab backing for Hezbollah. This plays into the hands of Iran. It harks back to Israel's mistake after the invasion of 1982, when pressure on Lebanese civilians undercut the then-moderate Shiite movement Amal, and gave birth to Hezbollah.
President Bush has an urgent responsibility to convey this message strongly to Jerusalem.
And Washington must rethink its Iran policy. Right now that policy is focused squarely on Iran's nuclear program; the Bush administration has said it will talk directly to Iran as part of multilateral negotiations on the nuclear issue, but not about regional questions. Iran has so far rebuffed this offer as insufficient.
It's time to broaden the agenda, to seriously test whether the officials around Khamenei who have sought broader talks are themselves serious. Talks are not a concession; it is in America's interest to find out whether Iran is willing to play a constructive regional role (and cease threatening Israel) - and what its price is.
Unless the United States and Iran can engage constructively, the region's violence could spin out of control.