At a corner table of the Marriott Hotel in Pakistan’s capital, an emissary from the Taliban’s supreme leader arrived with a message of peace.
It was 2007, as the Afghan Taliban insurgency was growing bolder. The United States-led international coalition was fixated on defeating the Taliban militarily, and that mission would only intensify when President Obama sent in tens of thousands more troops starting in 2009.
But that evening at the Marriott in Islamabad, the talk was about diplomacy, and there were no Americans in the room. Alf Arne Ramslien, a senior Norwegian diplomat who had cultivated relationships and trust within the Taliban for years, was meeting with a confidant of Mullah Muhammad Omar, the movement’s reclusive founder, who was directing the insurgency from exile in Pakistan.
The Taliban emissary gave Mr. Ramslien a list of five names that Mullah Omar had tasked with exploring the possibility of peace talks. They needed the help of a facilitator, he said, and Mr. Ramslien was it.
That exchange would initiate an intense, secretive process that over three years involved two or three meetings a month between Norwegian diplomats and fugitive Taliban representatives across cities in Asia and Europe, including Karachi, Bangkok and Oslo.
Astoundingly, the diplomats said they even had one direct, late-night audience with Mullah Omar himself — years after even senior Taliban leaders said they had last been in a room with him.
The Norwegian peace track overlapped with efforts by other countries to bring the Taliban to the table, including the United States and Saudi Arabia, and for years seemed to be making the most progress toward bringing the Taliban and Afghan officials together.
But it all eventually fell apart under the weight of military and intelligence maneuvering and of distrust among a host of countries that were taking a hand in Afghan affairs. Mr. Ramslien maintains that Pakistan, in particular, has been a central obstacle to any negotiated peace with the Taliban.
Now, for the first time, Mr. Ramslien is laying out some of the behind-the-scenes moments of triumph and setback in the three years that he helped lead Norway’s efforts to broker peace in Afghanistan.
His account, in an interview with The New York Times at his home outside Oslo, is essentially an open plea to his successors as they try to pick up the pieces and start new peace talks: Stay patient, and understand that success often starts with crazy ideas and comes in unexpected bursts — and that failure can happen regardless of your best efforts.
Mr. Ramslien shared his story just as painstaking efforts to negotiate an end to another decades-long conflict, in Colombia, seemed to be bringing results, despite a last-minute derailment by a national referendum vote.
Since 2007, efforts to negotiate an Afghan peace have had several Colombia moments — promising developments that suddenly fall apart because of bad timing, bad faith or miscalculation — without enjoying anywhere near the degree of success.
That is in part because of the complex nature of a war that has spun out over nearly four decades in its various chapters, and has been fought or aided by an ever-shifting and conflicting array of international interests.
For instance, the early Norwegian efforts were so hushed that they were kept a secret even from the Americans for the first two years. The Europeans feared that the United States, which had flatly refused efforts by senior Taliban officials to surrender and reconcile with the Afghan government in 2001 and 2002, would derail their efforts by targeting any Taliban emissaries for death or imprisonment.
Today, even as the United States has fully embraced the idea that political resolution offers the only lasting way out of the war, the Afghan peace process seems stalled, or at least confused. The Afghan government held a round of talks in Pakistan in the summer of 2015, but it fell apart quickly with questions still unanswered about the legitimacy of the representatives whom Pakistani officials had pressured the Taliban to send.
The early Norwegian contacts were maintained around the personal relationships of Mr. Ramslien, an unconventional diplomat who had been a Christian missionary in Pakistan in the 1960s. He understood that the Taliban’s worldview was rooted in religion, and could communicate with them — and even interpret for them — in Urdu, which he speaks fluently.
During his years as a diplomat in Islamabad, stretching back to the 1990s, Mr. Ramslien had made an impression not only on the Taliban government in Afghanistan, but also on the Pakistani madrasas — the religious schools that gave birth to the Taliban movement and to this day fill its ranks with foot soldiers.
Many of those seminaries were a legacy of American funding of the Islamic insurgency against the Soviet Union in Afghanistan. After the Soviet withdrawal, and after the United States virtually abandoned the region in the 1990s, Mr. Ramslien made a priority of continuing engagement with Pakistani and Afghan religious leaders — which he felt was necessary because in isolation those figures could become more dangerous.
With those credentials, it was Mr. Ramslien the Taliban approached in 2007 when they were looking for a go-between.
The initial contacts with the Taliban came with enormous risks for both sides. Norway was “dealing with an illegal armed group that was not only listed by the United Nations as a terrorist group, but was also in direct conflict with a NATO force that included Norwegian troops,” according to a recent report by a high-ranking commission on Norway’s 15-year involvement in Afghanistan.
The Taliban risked arrest by breaking United Nations travel restrictions, while holding meetings inside Pakistan would bring further scrutiny from a potential spoiler: the country’s powerful military Inter-Services Intelligence service — the ISI — which was protecting the Taliban in their Pakistani havens. Al Qaeda, too, wasn’t happy about the Taliban projecting an image of independence.
“They knew they had to make the ISI happy,” Mr. Ramslien said of the Taliban. “Then, at the same time, play another game totally independently.”
Early efforts by Mr. Ramslien and his Norwegian colleagues were focused on helping the Taliban, a rural military group with little political sophistication, come up with a set of cohesive demands for a meeting with the Afghan government.
And they made progress on that front, Mr. Ramslien said. In May 2008, the Taliban agreed to meet Afghan government representatives. After a brief delay, delegations from both parties arrived in Oslo in November, staying in the same area and, according to the Norwegian report, even in the same hotel.
But hours before the sides were to meet, there was a bombshell. A delegation member’s house outside Quetta had been blown up, killing the Talib’s brother and wounding his wife, Mr. Ramslien said. Everyone took it as a warning against trying to pursue talks.
“We had finished breakfast, and the next step was to meet,” Mr. Ramslien recalled. “They collapsed, you know, they were crying, they were shocked.”
The meeting was called off, and Mr. Ramslien accompanied the Taliban delegation back to Dubai in a private jet.
The efforts would soon resume again, and the secret discussions were aided in part, Mr. Ramslien said, by the election of President Obama. The Taliban felt optimistic about the president’s policy of seeking a new opening with the Muslim world, as he laid it out in a speech in Cairo.
In March 2009, the Taliban even arranged for the Norwegian diplomats to meet their reclusive leader, Mullah Omar, Mr. Ramslien said. Mr. Ramslien and two senior diplomats who came from Oslo were picked up at night and driven in circles before they pulled up to a compound, which Mr. Ramslien believes was probably outside the city of Karachi.
During the two-hour meeting, Mullah Omar — and Mr. Ramslien said he firmly believed it was indeed the Taliban founder he was meeting, after having spoken with him twice on the phone — reaffirmed a desire to seek talks.
“He was definitely very sick. He was sitting cross-legged. He was thick, quite thick — I did not expect that,” Mr. Ramslien said. “We knew that he had severe diabetes problems. We knew that he had kidney problems. And his talk was slurred.”
Later, President Obama’s agreeing to a military surge of 30,000 more troops to Afghanistan, in Mr. Ramslien’s view, was a significant setback to the process. His Taliban interlocutors said they were now forced to fight: “If they are bombing us from above, we will bomb them from below,” was how Mr. Ramslien characterized the Taliban’s attitude then.
Publicly, the Taliban insisted that they would never negotiate with the Afghan government while there was a single foreign soldier in the country. But Mr. Ramslien believed that was never an immutable demand, and his view is borne out by Taliban figures who were also involved in the process.
In Mr. Ramslien’s view, a far bigger obstacle was continuous obstruction by Pakistani officials who viewed the Taliban as a bargaining chip.
In February 2010, the highest-level conversation yet was scheduled to take place between the Afghan government and six Taliban members, including the movement’s deputy leader, Mullah Abdul Ghani Baradar. Days before the talks, Mullah Baradar was arrested by Pakistan, effectively ending that process and making it clear to the Norwegians who the real spoiler was.
“It became difficult to continue negotiations because of opposition not only within the Taliban itself, but also from Al Qaeda and, even more important, from ISI,” the Norwegian government report says. “The ISI’s position was made clear by the arrest of Mullah Baradar.”
Mr. Ramslien lost hope, moving on to take his final posting as ambassador to Nepal before retiring from the service.
Years later, as others are steadily working to revive the hope for a negotiated settlement, officials are still stuck on the question of Pakistan’s involvement, with some coming to believe that despite the risks of alienating Pakistan, it may be time to approach the Taliban through other channels.
(A version of this article appears in print on December 27, 2016, on Page A4 of the New York edition with the headline: How Secret Peace Talks Between Afghanistan and the Taliban Foundered.)