As chief of staff of the Chechen armed forces, Aslan Maskhadov did more than any other fighter in Chechnya to win the 1994-1996 war against Russia. He also did more than any other negotiator to bring peace.
The softly-spoken general succeeded against the odds in co-ordinating the actions of the numerous Chechen field commanders.
He turned a swiftly mobilised scratch army into a force capable of repelling Russian tanks, air power, and artillery.
Maskhadov said the rebels behind the Beslan attack were "madmen"
At the same time, he was at the forefront of peace negotiations in 1995 and 1996. His quiet pragmatism won the respect of Russian negotiators.
Chechens elected him president in January 1997 because of his war record, and because he promised a more peaceful future than younger and more radical rival candidates.
He insisted that Chechnya must be independent, but he was prepared to negotiate a close relationship with Russia.
He called for peace talks as recently as February 2005, but Russia scorned the suggestion.
In recent years Moscow had branded him a terrorist, along with other Chechen leaders.
After rebels seized a school in the North Ossetian town of Beslan in September 2004, causing more than 300 deaths, Russian authorities offered a $10 million reward for the capture of Mr Maskhadov and the Chechen warlord, Shamil Basayev.
They disregarded the fact that Mr Maskhadov publicly condemned the bloody attack, said that forces under his command had nothing to do with it, and called for Mr Basayev to face trial.
Like all Chechens of his generation, Aslan Maskhadov was born in exile. His family was deported from Chechnya by Stalin, along with the rest of the Chechen nation, in 1944. They returned home from Kazakhstan in 1957, when he was a child of six.
Shamil Basayev and other radicals sidelined Aslan Maskhadov
The future president became a career artillery officer in the Soviet army. He served in Hungary and took part in the Soviet army's attempt to suppress Lithuania's nationalist independence movement in January 1991 - an episode he quickly came to regret.
He became breakaway Chechnya's chief of staff the following year.
People who met him in this role said he always retained the air of a staff officer, neatly dressed at all times despite a life spent on the run from Russian forces.
But in a personal tragedy for him and for Chechnya, Mr Maskhadov enjoyed less success as a politician than as a soldier.
His main rival in the January 1997 election was the charismatic Shamil Basayev. Mr Maskhadov's instinct was to build consensus after his victory, first making Mr Basayev deputy chief of the Chechen army, then acting prime minister.
In 1998, however, Mr Basayev joined many other former field commanders in an unruly opposition and Chechnya gradually spiralled out of control.
The commanders evolved into warlords, running areas of Chechnya as their own fiefdoms, operating rackets and taking over parts of the economy.
Some came under suspicion when Mr Maskhadov twice narrowly escaped assassination in car bomb explosions.
According to one reports, his former subordinates even threatened him with a gun.
Mr Maskhadov's weakness was illustrated by a series of high-profile kidnappings in 1998 and 1999.
Foreign aid workers and Russian envoys joined hundreds of less well-known victims held for ransom in Chechnya.
Mr Maskhadov and his government were powerless to release them.
The Chechen president was also unable to prevent the warlords launching a "holy war" to drive Russians out of neighbouring Dagestan.
Mr Maskhadov's own attitude to Islam was characteristically conservative. He encouraged the rebirth of Chechen religious traditions, but attempted, unsuccessfully, to ban the fundamentalist trend of Islam known as Wahhabism.
When Russian forces flooded back into Chechnya in 1999, Mr Maskhadov and the warlords stood side by side again, in an uneasy alliance.
But he appeared to have been progressively sidelined.
Funding from sympathisers in the Islamic world reportedly flowed primarily to the radical Chechen commanders, and to the Arab commanders fighting alongside them.
The radicals have carried out daring, headline-grabbing attacks on civilians - including the Beslan school attack and the earlier seizure of a Moscow theatre.
Mr Maskhadov described the perpetrators of Beslan as "madmen" driven out of their senses by Russian acts of brutality.
To the end, he condemned the killing of civilians.