But Sundarji was vilified for committing the expeditionary Indian Peace Keeping Force, the IPKF, to Sri Lanka to disarm Tamil Tiger rebels fighting for independence following a bilateral treaty between the two neighbours in 1987. Armed with little or no intelligence regarding the rebels, the Indian army walked into a virtual trap laid by the highly committed Tigers in the north and east of the island. It took the IPKF over two years to extricate itself from Sri Lanka having failed in its mission, but only after suffering an unusually high casualty rate and covering itself with ignominy.
The irrepressible Sundarji also organised Operation Brasstacks, India's largest ever military exercise in the late 1980s, in northern and western India, seriously raising tensions with Pakistan who feared an attack under the guise of peacetime manoeuvres. Brasstacks was aimed at cutting the southern Pakistani province of Sindh in two to make it easy for India to thrust into Pakistan's heartland of Punjab.
Sundarji also planned a covert, albeit cynical, winter offensive against Pakistan-occupied Kashmir in which he was willing to take an exceptionally high casualty rate in snowbound, inhospitable terrain at heights of over 14,000 feet to resolve the Kashmir dispute over which the nuclear-capable neighbours have fought two of their three wars since independence in 1947. He achieved the near impossible task of ferrying tanks to a height of nearly 13,000 feet for the bold operation but at the last minute was ordered to call it off by the perspicacious Rajiv Gandhi.
Fighting also escalated during Sundarji's tenure as army chief along the 20,000-feet-high Siachen glacier, the world's highest battle ground, claimed by both India and Pakistan, where hundreds of soldiers have died since the early 1980s in cross-border firing and from exposure to temperatures that average 30 degrees Celsius below freezing. Nearly two Indian soldiers die every day on Siachen as the posts they occupy are higher and colder than those held by Pakistan.
The confrontation over Siachen is a financial burden for both sides, totalling around $2m a day. India's outlay, however, is higher as everything is flown in by helicopter. According to official estimates one chapatti (unleavened bread), staple food for soldiers, costs over 12 rupees (16 pence), or 80 times its normal cost.
Sundarji also raised the ante with China - with whom India fought a disastrous war in 1962 over a territorial dispute that remains unresolved - during two exercises, Operation Checker Board and the follow-on Operation Falcon along the eastern front in the late 1980s.
He strongly advocated India becoming a nuclear weapon state, frequently detailing in newspapers and at seminars the exact number of missiles it would need to build an arsenal of weapons of mass destruction to deal with Pakistan and China.
In 1984, as head of Western Command, Sundarji planned Operation Bluestar to flush out armed Sikh separatists hiding in the Golden Temple in Sikhism's holy city of Amritsar in the north. The disastrously executed operation in which over 500 people including around 80 soldiers and scores of women and children died, ended after 72 hours of fierce fighting when tanks were brought in.
Operation Woderose, the mop-up exercise that followed to apprehend terrorists across Punjab state, alienated the entire Sikh population. It led eventually to the assassination of the prime minister Indira Gandhi by her two Sikh bodyguards in October 1984 followed by the anti-Sikh pogrom in Delhi and other north Indian cities in which over 5,000 people - mainly Sikhs - were murdered.
But Sundarji was involved in controversies other than operational. He was a major player in the import of 410 howitzers from Sweden in the mid- 1980s in which kickbacks of over $200m were allegedly paid to Indian officials and politicians. The complex Bofors case, which is still under investigation, led to the downfall of Rajiv Gandhi's Congress government and tarnished the image of India's military, considered till then to be above corruption.
Born into a high-caste Brahmin family in southern India in 1928, Sundarji graduated from Madras Christian College and joined the British- Indian army in 1945, two years before independence. He was commissioned into the prestigious Mahar infantry regiment a year later and posted to the North West Frontier Province (now in Pakistan) to quell restive Pathan tribesmen forever at war with the colonial administration. Thereafter he was posted to the disputed, northern Kashmir state of which Pakistan forcibly occupied a third in 1947 before it was halted by the Indian army.
He attended the Defence Services Staff College at Wellington in southern India in 1959 and after a series of command and staff postings was part of the United Nations armed contingent to the Congo in the early Sixties. As chief of staff of the Katanga command combating rebels, he was mentioned in dispatches for gallantry.
On returning home in 1963 Sundarji took command of an infantry battalion and participated in the second war with Pakistan in 1965, again over Kashmir. A tenure as instructor at the Staff College, Wellington was followed by the US Army Command and General Staff course at Fort Leavenworth. He graduated from the National Defence College in Delhi in 1971 and was posted as brigadier, General Staff of a corps involved in the 1971 operations against the Pakistani army in East Pakistan that broke away to become Bangladesh.
In 1976 Sundarji became the first infantry officer to command an armoured division. During his three-year tenure he realised his ambition of raising the desperately needed mechanised infantry regiment and was a forceful member of the committee reorganising the army before being promoted to lieutenant-general and becoming deputy chief of army staff. After two years as general officer commanding-in-chief Western Command during which he planned Operation Bluestar, Sundarji became vice-chief of army staff then chief in 1986.
Till he retired 26 months later he did more than any army chief before or after. Criticised by many for his naked ambition and aggression, Sundarji's simple answer was "I have to aim for the moon". After retirement he completed his masters in defence studies at Madras University and remained in the limelight by admitting that he had been pressured to opt for the Swedish howitzer by the government. In his 1993 book Blind Men of Hindoostan - Indo-Pak nuclear war, he wrote a fictional account of a nuclear war between the two neighbours that came chillingly close to reality.
An engaging and charming conversationalist Krishnaswami Sundarji was a keen gardener and a wild-life enthusiast who lived under "Z", the highest category of security, surrounded by army commandos for his involvement in Operation Bluestar and in Sri Lanka.
Krishnaswami Sundarji, soldier: born 30 April 1928; Deputy Chief of Army Staff 1981-82; general officer commanding-in-chief, Western Command 1983-86; vice-chief of army staff 1985-86; army chief 1986-88; married (one son, one daughter); died New Delhi 8 February 1999.