Headlines in India over the last week have highlighted former US President Barack Obama’s judgment of several Congress leaders in his newly published memoir, Promised Land. Obama praises former Indian Prime Minister Manmohan Singh’s “uncommon wisdom”, Congress President Sonia Gandhi’s “shrewd and forceful intelligence” – and describes former Congress President Rahul Gandhi as being like a student lacking “either the aptitude or the passion to master the subject.”

The descriptions have earned reactions from many in India, with Opposition leaders criticising Obama’s portrait of Rahul Gandhi, while supporters of the ruling Bharatiya Janata Party have reveled in further criticism of the Congress leader from a major international figure.

But the small India section of Obama’s book, which covers his historic campaign and first term in the White House between 2008-2012, seems to tell a bigger story about how the former US president came to understand the dangers that lie in the lurk in large, multi-ethnic democracies. Specifically, Obama writes that he wondered whether the Congress under Rahul Gandhi would be able to keep the BJP’s “divisive nationalism” in check.

Without naming either Indian Prime Minister Narendra Modi, who he will presumably tackle in the second volume of his presidential memoirs, or his polarising successor Donald Trump, the India portion gives us a glimpse of how Obama saw troubling similarities in the democratic challenges faced by both nations – and a warning delivered by Manmohan Singh.

Obama writes:

“What I couldn’t tell was whether [Manmohan] Singh’s rise to power represented the future of India’s democracy or merely an aberration...

Although India had fared better than many other countries in the wake of the financial crisis, the global slowdown would inevitably make it harder to generate jobs for India’s young and rapidly growing population..

Singh had resisted calls to retaliate against Pakistan after the attacks,but his restraint had cost him politically. He feared that rising anti-Muslim sentiment had strengthened the influence of India’s main opposition party, the Hindu nationalist Bharatiya Janata Party (BJP).

“In uncertain times, Mr. President,” the prime minister said, “the call of religious and ethnic solidarity can be intoxicating. And it’s not so hard for politicians to exploit that, in India or anywhere else.”

The former US president describes this warning from Singh as reminding him of a discussion on the rising illiberalism of Europe with former Czech Republic President Vaclav Havel. He goes on to write,

“If globalization and a historic economic crisis were fueling these trends in relatively wealthy nations—if I was seeing it even in the United States with the Tea Party—how could India be immune?”

Obama describes visiting India and feeling inspired by a trip to Mani Bhavan, the Mumbai residence of Mohandas ‘Mahatma’ Gandhi, where he found himself “trying to imagine Gandhi present in the room” and having “had the strongest wish to sit beside him and talk.”

Later, Obama describes going to dinner with Singh, Sonia Gandhi and Rahul Gandhi – the portion of his memoir featuring the descriptions that have made headlines in India. At the end of the evening, Obama notes Manmohan Singh’s relative frailness and finds himself wondering what would happen after his time had ended.

Would the baton be successfully passed to Rahul, fulfilling the destiny laid out by his mother and preserving the Congress Party’s dominance over the divisive nationalism touted by the BJP? Somehow, I was doubtful.

It is in this concluding portion that follows where one can most clearly see Obama’s reading of events in India as a warning for what was happening in his own country. Without mentioning either Modi or Trump, the overall story Obama is telling – including finding resonance with the challenges faced by Manmohan Singh – seems quite apparent:

“It wasn’t Singh’s fault. He had done his part, following the playbook of liberal democracies across the post–Cold War world: upholding the constitutional order; attending to the quotidian, often technical work of boosting the GDP; and expanding the social safety net. Like me, he had come to believe that this was all any of us could expect from democracy, especially in big, multiethnic, multireligious societies like India and the United States....

Except now I found myself asking whether those impulses—of violence, greed, corruption, nationalism, racism, and religious intolerance, the all-too-human desire to beat back our own uncertainty and mortality and sense of insignificance by subordinating others—were too strong for any democracy to permanently contain.

For they seemed to lie in wait everywhere, ready to resurface whenever growth rates stalled or demographics changed or a charismatic leader chose to ride the wave of people’s fears and resentments. And as much as I might have wished otherwise, there was no Mahatma Gandhi around to tell me what I might do to hold such impulses back.”