Iranian President Mahmoud Ahmadinejad recently surprised the international community by sending a lengthy letter to President Bush — the first communication to an American chief executive from an Iranian head of state in decades.

It was a curious document — a rambling 18-page treatise on history, religion, politics and world affairs. As a foundation for serious, substantive negotiations on the Iranian nuclear crisis, the letter was decidedly inadequate.

Nevertheless, Washington’s initial response was disappointing and incredibly shortsighted. Secretary of State Condoleezza Rice dismissed the letter even before it had been translated. President Bush’s reaction was not much better. He criticized it for not answering “the question the international community is asking.” Namely, “when will Iran give up its nuclear program?”

In other words, unless Iran’s leaders are willing to pre-emptively surrender on the issue that is the principal U.S. grievance, Washington is not interested in any dialogue with Tehran. That is unsophisticated and ineffectual diplomacy.

Ahmadinejad’s letter is only the most high-level indication that the Iranian political elite is interested in negotiations, and perhaps even a normal relationship, with the United States. A proper response would have been to issue a formal reply to the Iranian president. That does not mean that the administration would have needed to concede any of the substantive points in the letter, but a reply would have indicated that we were at least willing to talk.

One should have no illusions. The current Iranian government is one of the more repressive, difficult and odious regimes on the planet. Tehran’s policy of supporting groups that use terrorist tactics is especially reprehensible. Ahmadinejad’s hateful screeds against Israel are both bizarre and repulsive.

But the United States does not have the luxury of engaging only pleasant, democratic and tolerant governments. One of the great challenges of effective diplomacy is to deal with, and get results from, regimes that most Americans would prefer did not exist.

Since the days of Woodrow Wilson, Washington’s typical response to unfriendly, repressive governments (especially of small countries) is to try to isolate and berate them. Before Wilson, the general U.S. practice was to deal with any government that controlled a country, whether we liked the regime or not. That policy was far more realistic and productive. The current approach is akin to the maturity level one would expect from an elementary school student: “I don’t like you, and I’m not going to speak to you.”

That strategy has produced utterly unsatisfying results. For more than two decades after the end of the Vietnam War, Washington did not have diplomatic relations with Hanoi, even though Vietnam was a significant political and military player in Southeast Asia. We have pursued a similar policy of truculence toward Cuba for four-and-a-half decades, without dislodging the Castro regime’s grip on power.

Even worse, we have adopted the same approach toward North Korea and Iran, even though both countries are on the brink of entering the global nuclear-weapons club. Consider that for a moment. We have no relations with two countries that may soon have nuclear arsenals (and in North Korea’s case, may already have one). That is not only foolish, it is profoundly dangerous.

Washington needs to change its policy immediately, and the place to start is with Iran.

The Iranian leadership is reaching out to the United States. Is anyone in the Bush administration astute enough to recognize an important opportunity when it comes knocking at the door? The world is waiting to find out.