Profile: Afghanistan's President Hamid Karzai
Hamid Karzai became leader of Afghanistan in the same year as the US-led invasion of his country in 2001, and is due to step down in 2014 - the year that all Nato combat troops are scheduled to leave his country.
The fact he has survived in office for so long is no mean achievement in a country renowned for its violence and volatility.
Despite criticism at home and abroad over his stewardship, President Karzai is now one of Asia's longest serving leaders.
He has faced numerous and competing challenges. Not least was the task of pulling the country together in the aftermath of years of rule by the Taliban, who were ousted in the US-led invasion.
This meant trying to unite factions that were previously at war with one another - from ex-Communists and former mujahideen to Taliban who had moved on and Northern Alliance figureheads.
One major plank of his strategy was to seek peace with the Taliban by inviting them to talks.
But Mr Karzai's government's relations with Nato and his relationship with the US in particular have become increasingly strained in recent years and have inevitably dominated the headlines.
Urbane, well-educated, Westernised and stylish, Mr Karzai was initially feted by foreign governments.
And in 2004, he became the first popularly elected president of Afghanistan - nearly three years after being appointed the country's interim leader.
He has for the most part consistently succeeded in attracting overseas investment to rebuild his war-torn country. The shops and businesses now flourishing in Kabul and to a lesser extent in other towns and cities are proof of that.
In July 2012, for example, international donors at a conference on Afghanistan pledged to give it $16bn (£10.3bn) in civilian aid over four years to safeguard its future after foreign forces leave. In the preceding decade, $60bn was donated.
But at times foreign governments have had a low opinion of the Afghan leader, criticising him for his failure to prevent corruption and to confront the traditionalists in order to promote women's rights.
His principal enemy, however, have been the Taliban, who have frequently accused him of being an American stooge: They say they cannot do business with him.
So it is perhaps ironic that his increasingly fraught relations with the US may prove to be the defining aspect of his time in power.
An indication of just how fragile those relations are was clearly seen in March 2013 when the president accused both Washington and the Taliban of colluding to prolong the conflict and the stay of foreign forces in his country.
His remarks were condemned in leaked comments by the senior Nato leadership as "a catalyst for some to lash out against our forces".
But they also reflected the president's growing frustration over what he saw as American attempts to undermine his government's authority.
One goal definitely shared with Washington is his constant refrain to pressure Pakistan to do more to eliminate Taliban sanctuaries on its soil.
In later years, President Karzai also became frustrated about his continued reliance on foreign forces and he clashed with the US over the issue of civilian casualties caused by Nato, US detention centres and the very approach of the war, which he stressed was not focused on dismantling militant sanctuaries in Pakistan.
Battle against corruption
Mr Karzai has survived numerous assassination attempts - in 2002, 2004, 2007 and 2008 - but his admirers point out that he has never allowed the threat of death to force him into being seen less often in public.
His critics say that his writ does not extend much beyond Kabul, and is likely to be further weakened after foreign forces withdraw and the Taliban fill some of that vacuum.
Likewise in the battle against corruption Mr Karzai has a patchy record.
While successfully attracting billions of dollars of international aid to his country, much of it is believed to have been lost because of widespread corruption.
The president admitted that corruption existed in his government and established a special commission to tackle it. But he repeatedly accused international donors of a lack of transparency in allocating big contracts.
On the issue of women's rights, the president was widely praised in 2009 for approving a law - which at the time did not need parliamentary approval - that stipulated that violence against women was illegal.
But in 2012 he endorsed a "code of conduct" issued by an influential council of clerics which under certain circumstances allowed husbands to beat their wives.
His personal history reflects the turbulent history of the country.
Born on 24 December 1957 in Afghanistan's Pashtun heartland, Kandahar, he was educated in Kabul and went to university in Simla, India as a fluent English speaker.
In the early 1980s, he joined the struggle against the Soviet invasion of his country and became director of information at the Afghan National Liberation Front (ANLF).
He served as deputy foreign minister after the mujahideen took over Kabul in 1992. But he resigned after war between various factions broke out. Thousands of people were killed and most of the capital, Kabul, destroyed.
When the Taliban erupted on to Afghanistan's political scene in the mid-1990s, Mr Karzai initially supported them.
However, he became suspicious of the movement, fearing it had been infiltrated by foreigners including Pakistanis and Arabs.
Eager to build a broad-based government, he found himself in pole position to lead his country following the Taliban's fall after slipping into Afghanistan from Pakistan - where his family had lived in exile for some years - in October 2001.
By the time a United Nations-sponsored conference met in December of that year in Bonn, Germany to set up an interim government for Afghanistan, Mr Karzai had strong American backing and was advancing on the Taliban stronghold, Kandahar, with his tribal supporters from a newly established base in Uruzgan province.
And as a royalist Pashtun from the south, he was accepted as the right man with the right credentials to be new leader by all the parties at the Bonn Conference.
Mr Karzai was constitutionally barred from seeking a third term as president. Whether the 2014 elections result in a smooth democratic transition or more conflict will to some extent determine whether his years in power come to be regarded as success or failure.