KATHMANDU - Former Nepal prime minister Sushil Koirala, a veteran politician once jailed for helping to hijack a plane, died in Kathmandu Tuesday aged 77 after suffering from pneumonia, his doctor said.

Koirala, premier for 20 months until last October, played a pivotal role in drafting a controversial new constitution aimed at unifying the impoverished country following the end in 2006 of a decade-long Maoist insurgency.

He came in for heavy criticism for his government’s sluggish response to a massive earthquake that devastated the Himalayan nation last April and killed nearly 9,000 people.

Koirala, who had battled chronic bronchitis and other illnesses, was diagnosed with pneumonia last week, his doctor Kabirnath Yogi told AFP. “He was taking medicine and was even showing improvement yesterday. But at 11 last night his condition suddenly deteriorated,” said Yogi, an associate professor at Kathmandu’s Teaching Hospital. He died shortly before 1am before the ambulance arrived, Yogi said.

Koirala headed the country’s biggest political party, the Nepali Congress, and was tasked as premier with writing the long-delayed new constitution to complete a stalled peace process.

The constitution, the first to be drawn up by elected representatives, was meant to bolster Nepal’s transformation from a Hindu monarchy to a democratic republic.

But more than 50 people were killed in clashes between police and members of an ethnic minority protesting against the charter, which they say leaves them politically marginalised.

The constitution’s adoption in September paved the way for parliament to elect a new premier and Koirala lost his bid for a second term to K.P. Sharma Oli.

Hundreds of tearful officials, ministers and opposition party lawmakers converged at Koirala’s house and at the Nepali Congress office to pay their respects.

“He made an extraordinary contribution to Nepali politics,” Oli told reporters. “All Nepalis will remember his role in promulgating a constitution (and) establishing a federal democratic republic,” he said.

A veteran politician, Koirala cultivated strong links with lawmakers in neighbouring India.

He was once exiled there with his family for their opposition to Nepal’s then party-less “panchayat” system of local councils overseen by an absolute monarchy.

Indian Prime Minister Narendra Modi paid tribute to Koirala, describing him as “a big leader who served Nepal for decades”.

“India lost a valued friend. Pained by his demise”, Modi also tweeted.

Koirala was born in 1939 in eastern Nepal, but his family fled to India in 1960 after the then-king suspended democracy and jailed dozens, including some of his relatives - one of whom was prime minister.

When he was in his 30s, Koirala was involved in hijacking a plane believed to be carrying boxes of cash. He and his relatives wanted to use it to fund the Nepali Congress, a party long dominated by his family.

He spent three years in an Indian jail over the crime, which was masterminded by senior Congress leader and relative G.P. Koirala.

Koirala had a long history of poor health, undergoing radiotherapy for lung cancer in 2014 and surgery for tongue cancer 10 years ago.