Hello, Ayatollah? This is Donald Trump calling

Iran’s Islamic revolutionaries can be a prickly bunch.

I learned that the hard way in 1980, when as a young reporter I was arrested by Revolutionary Guards in Isfahan for trying to find the 52 Americans who had been taken hostage at the U.S. Embassy the year before.

“You’re a spy,” my interrogator barked. “I’m a journalist,” I replied with as much confidence as I could find. He didn’t seem to think there was a difference.

After four hours, he got a telephone call. “You’re free to go,” he growled at me.

That wasn’t the end of the story. A few days later, a radical group publicly accused me of espionage, named the hotel in Tehran where I was staying and urged “the militant people of Iran” to storm the building.

It seemed like a good time to check out. I spent 18 hours hiding in a friend’s apartment, slipped through the airport under a fake name, and fled to London the next day.

I was lucky. The hostages were held for 444 days. More recently, Washington Post reporter Jason Rezaian was imprisoned for 18 months, and Iran is currently holding several Iranian Americans on apparently trumped-up charges.

So I know a little about the distrust and suspicion between the Iranian regime and the United States.

Ever since the 1979 Islamic revolution, leaders in Washington and Tehran have demonized the other side. From time to time, they quietly find common ground in places like Afghanistan (Iran also opposes the Taliban and al-Qaida).

In 2015, Iran agreed to limit its nuclear development program in a landmark deal with the U.S. and five other world powers.

But Iran remains a pariah in Washington, unpopular with both parties, and President Trump withdrew from the Iran nuclear deal last year, denouncing Tehran’s “malign” activities across the Middle East.

Hence the headlines when President Donald Trump, at the Group of 7 summit in France, did an about-face and boasted of his friendship with Iranians in New York, declared his desire to make Iran wealthy again, and offered to meet with Iranian President Hassan Rouhani.

“I have a good feeling,” Trump said in Biarritz. “I think he is going to want to meet and get their situation straightened out.”

Rouhani, in Tehran, initially sounded interested. But by Tuesday, he was having second thoughts.

“First, the U.S. should act by lifting all illegal, unjust and unfair sanctions imposed on Iran,” he said. Otherwise, he added, a meeting would be nothing but “a photo op.”

Actually, a photo op may be exactly what Trump is looking for – much like the three summits he’s held with North Korea’s Kim Jong Un since June 2018.

Those meetings have enabled Trump to claim that he rescued Asia from the brink of war, even though he hasn’t gotten Kim to stop expanding his nuclear arsenal.

At the moment, oddly, Trump appears more interested in negotiations than Rouhani does, even though Iran’s economy is being battered by U.S. sanctions. But Trump is heading into a re-election campaign, and wants a foreign policy win.

Iran’s reluctance to parley comes from the very top. Its supreme leader, Ayatollah Ali Khamenei, has long excoriated the U.S. as the chief cause of his nation’s woes. But it may also be a bargaining ploy. Trump’s sanctions have slashed Iran’s income from oil exports, thrown its economy into recession and driven inflation over 35%.

The president’s decision to scrap the nuclear pact was unwise. But Trump deserves credit on at least one count: If his enthusiasm for negotiations is real, at least he’s looking for a way to use the sanctions to win diplomatic achievements – not merely to wreck Iran’s economy.

Trump has been more flexible toward Iran than his hard-line lieutenants, especially national security adviser John Bolton and Secretary of State Mike Pompeo.

Negotiations with Iran were always going to be difficult to launch. In addition to the heavy weight of history, hardliners in both governments will dig in their heels against concessions.

What’s encouraging is that after several scary near-clashes in the Gulf, both countries say they want to start negotiations, not war. They’re arguably closer to talks than at any time since Trump arrived in the White House.

But it won’t be as easy as it looked for that magic moment in Biarritz.

Doyle McManus is a Los Angeles Times columnist.