A historic meeting took place in Baghdad overnight between Iranian and US ambassadors — said to be the first high-level formal talks between the two countries since diplomatic relations were broken off a generation ago, in 1979.

The talks were confined to the “security situation” in Iraq, and no concrete agreement was reached. But both sides described the meeting in positive terms, and seemed open to the possibility of further talks in the near future.

For the most part, American and Iranian objectives in Iraq are very similar. Both are aligned to the Shi’ite majority there; neither wants the country to fragment, or to become a shelter for terrorism, and neither has any interest in its continued impoverishment.

Their big difference is in regard to the occupation itself. Washington apparently puts the maintenance of its own military presence ahead of any other goals, while Tehran, not unreasonably, sees that as a threat to its own interests — as well as counter-productive in terms of Iraq’s stability. (It’s testament to the irrationality of US policy that an Islamic theocracy seems to have a better grasp of reality than the Bush administration.)

That difference will almost certainly prevent anything other than very limited agreement. But the other thing standing in the way is that the US government doesn’t really want to agree with Iran — the fact that it agreed to these talks at all is a measure of its desperation when it comes to Iraq.

America’s attitude is clearly revealed in the big issue that the talks did not cover — Iran’s continuing nuclear enrichment program. The US last week attacked the head of the International Atomic Energy Agency, Mohamed ElBaradei, for suggesting that international sanctions were not working and that a negotiated settlement might allow Iran to continue some enrichment activity.

So far, the US and European powers have maintained a united front on sanctions, but that conceals a basic difference in approach. The Europeans are primarily interested in stopping nuclear proliferation; the US is more interested in humiliating the Iranians.

That’s why, despite last night’s exercise in Baghdad, America continues to regard negotiations as a last resort.