The negotiations — potentially as historic and as politically wrenching as the Paris peace talks that ended the Vietnam War — come after more than a decade of war in Afghanistan and they could unfold in the middle of President Obama’s re-election campaign.

The reversal of the Taliban’s longstanding public refusal to negotiate with the United States — and the administration’s willingness to reciprocate — punctuated a highly compartmentalized effort that has proceeded in fits and starts, with the knowledge of very few officials, according to administration and Afghan officials involved in the negotiations. Begun by the American envoy Richard C. Holbrooke, who died in 2010, it has been conducted by his successor as senior representative to Afghanistan and Pakistan, Mr. Grossman, a former ambassador to Turkey who came out of retirement to take on what has been described as one of the most difficult jobs in government. His team includes about a half-dozen State Department, Defense Department and intelligence officials.

Only a month ago, when envoys from dozens of countries gathered in Bonn, Germany, hoping to announce a new push for political reconciliation in Afghanistan, the effort appeared moribund. The fiercest opposition came from Mr. Karzai, whose position on the prospect of talks, one senior administration official said, involved wild swings in mood and position.

Under pressure from the administration, however, Mr. Karzai ultimately relented, dropping his objections, though he continued to make demands on the location of any Taliban office until the day after it was announced.

With the United States and NATO already having announced that they would withdraw most international forces from Afghanistan by 2014, the search for some kind of political reconciliation between the new government and the Taliban became an imperative for the administration.

Nearly a year ago, Mrs. Clinton first signaled the opening for talks by recasting the administration’s longstanding preconditions: that the insurgents lay down their arms, accept the Afghan Constitution and separate from Al Qaeda. Instead, she described them as “necessary outcomes.”

By then, Germany’s intelligence agency had already brokered a meeting in Munich in November 2010 between the Americans and Tayeb Agha, an English-speaking former aide and spokesman for the Taliban’s leader, Mullah Omar, who is believed to remain in hiding in Pakistan.