KATHMANDU (AFP) - Girija Prasad Koirala, the former prime minister who brokered Nepals peace agreement and led a protest movement against his countrys autocratic king, died Saturday aged 85. Koirala, who had been suffering from respiratory disease for many years, died surrounded by family members at his daughters home in Kathmandu, aide Gokarna Poudel told AFP. Thousands of people gathered outside to pay their respects to the elder statesman of Nepalese politics, whose lasting legacy began in 2006 when he sided with Maoist rebels to force former king Gyanendra to relinquish dictatorial powers. Koirala staked his political career on turning against the autocratic monarch and making peace with Maoist rebels to bring an end to a decade of civil war in which more than 16,000 people had died. Political change ensued at a breakneck pace, with the former rebel Maoists winning landmark elections in 2008, abolishing the 240-year-old Hindu monarchy and transforming the impoverished country into a secular republic. Koirala was a mass leader and a statesman, whose knowledge and wisdom guided the polity of Nepal in the right direction at critical junctures in the countrys history, said Indias Prime Minister Manmohan Singh. Koirala began his political career as a union organiser and was imprisoned for seven years in 1960 after a failed uprising against the monarchy. Upon his release he went into exile in India, where he masterminded the 1973 hijacking of a Royal Nepal Airlines plane known to be carrying hundreds of thousands of dollars in cash to fund his banned Nepali Congress party. As prime minister, Koirala led the Himalayan nation through some of its biggest upheavals, including its most notorious upset when 10 members of the royal family were shot dead by the crown prince in a drunken rampage. He was seen as a stabilising force in a country that has seen 18 governments in the last 20 years - although like many politicians in Nepal he faced frequent allegations of corruption. His oft-repeated ambition was to see the peace process through before he died, and he remained heavily involved in politics until his death, playing a crucial role as broker between the Maoists and other parties. He will be much missed, especially now that the country is nearing the end of the peace process that he facilitated, Maoist leader Baburam Bhattarai told AFP. Sushil Koirala, acting head of the Nepali Congress party, said the veteran leaders death was 'a great loss for our party and our country. I know him as a generous man who dedicated his life to the fight for democracy. The whole country is in shock, he said. Koiralas body will lie in state at the national stadium from Sunday (today), with his funeral to be held later in the day at the Pashupatinath Hindu temple in Kathmandu.