In Iraq, the dream of a peaceful and democratic ally in the Arab world is giving way to a renewal of violence and an authoritarian government that lists toward Iran. In Afghanistan, the future is uncertain and hangs on dozens of “ifs” — if the elections are fair enough, if the Afghan security forces can fight off insurgents, if the government can become self-sufficient.

In the years ahead, Mr. Crocker sees, if anything, an increasingly fraught foreign landscape in a world set afire by war and revolution, a chapter bound to frustrate the best intentions and most sophisticated strategies of the United States. Although he speaks Arabic and has spent a lifetime immersed in the Arab world and Afghanistan, Mr. Crocker is deeply skeptical that Americans on foreign soil can be anything other than strangers in a strange land.

“We’re a superpower, we don’t fight on our territory, but that means you are in somebody else’s stadium, playing by somebody else’s ground rules, and you have to understand the environment, the history, the politics of the country you wish to intervene in,” he said.

Although publicly Mr. Crocker has sometimes presented the glass as half-full when assessing the situation in foreign countries, fellow diplomats say that his private analyses tend to be stark and unromantic — a vision shaped by his 38 years of experience in which he confronted over and over the limits of American power and the hostility of many in the world to what the United States stands for.

In 1983, while a political attaché in Lebanon, he was in his office when a delivery truck loaded with explosives slammed into the American Embassy in Beirut, killing 63 people, including 17 Americans. He was one of the first on the scene to walk through the smoldering wreckage looking for his colleagues.