NEW YORK - James Dobbins, the United States special envoy for Afghanistan and Pakistan, plans to leave his post this month, according to media reports on Wednesday.

Dobbins departure comes as Afghanistan is struggling to determine the results of its Presidential election, a process that has been undermined by fraud allegations.

The announcement also comes a little more than a month after the US released five Taliban fighters from Guantanamo Bay, Cuba, in exchange for US Army Sgt. Bowe Bergdahl.

His move also follows a tumultuous year in which the Obama administration settled on a plan for withdrawing American forces from Afghanistan but ran into a roadblock in trying to pursue peace talks with the Taliban.

Dobbins, a 72 year-old diplomat, will be succeeded by his Deputy, Daniel Feldman, whose ties to Secretary of State John Kerry date back to Secretary of State John Kerry’s 2004 Presidential campaign, according to The New York Times.

In an interview with the Times, Dobbins took a hopeful, if somewhat guarded, view of the troubled political situation in Afghanistan.

The sizable turnout in the Afghan elections to select a successor to President Hamid Karzai initially raised hopes of a smooth political transition. But allegations of fraud in the runoff between the two remaining candidates, Abdullah Abdullah and Ashraf Ghani, have cast a cloud over the political process and delayed the signing of an agreement that would establish a legal basis for American troops to remain in Afghanistan after 2014.

“I think this election impasse at the moment is serious and could present a real danger of a division in the country,” Dobbins said. “It is not unusual for countries at this level of development. They don’t tend to have a tradition of good losers.”

But Dobbins asserted that Afghanistan was “better positioned” to deal with its political crisis because its religious, linguistic and ethnic tensions were not as sharp as those that once divided Yugoslavia or that now threaten to splinter Iraq.

“But wending our way through this and getting a clear result that everybody acknowledges is legitimate and acceptable is the proximate and probably most important variable for Afghanistan’s future,” said Dobbins, adding, he was “hopeful that it will be brought to a conclusion in the next few weeks.”

During his long career, Dobbins served as special envoy on Somalia, Haiti and the Balkans. After the terrorist attacks on Sept 11, the Bush administration appointed him as a special envoy for Afghanistan.

Dobbins helped forge the consensus at the Bonn conference in 2001 that settled on Karzai to serve as Afghanistan’s first President, before leaving the State Department for the Rand Corporation. He had no intention of returning to government until Kerry called from Paris in the spring of last year to ask him to fill the special envoy post, and he agreed to do it for a year.