The postcard was a trinket of public diplomacy, a souvenir of the new president's affinity for India. Now that Mr. Obama is visiting India for the first time, on a trip pitched as a jobs mission, his fascination with Gandhi is influencing his itinerary and his message as he tries to win over India's skeptical political class.
"He is a hero not just to India, but to the world," the president wrote in a guest book on Saturday in Gandhi's modest former home in Mumbai, now the Mani Bhavan museum.
Yet if paying homage to Gandhi is expected of visiting dignitaries, Mr. Obama's more personal identification with the Gandhian legacy -- the president once named him the person he would most like to dine with -- places him on complicated terrain.
Gandhi remains India's patriarch, the founding father whose face is printed on the currency, but modern India is hardly a Gandhian nation, if it ever was one. His vision of a village-dominated economy was shunted aside during his lifetime as rural romanticism, and his call for a national ethos of personal austerity and nonviolence has proved antithetical to the goals of an aspiring economic and military power.
If anything, India's rise as a global power seems likely to distance it even further from Gandhi. India is inching toward a tighter military relationship with the United States, once distrusted as an imperialist power, even as the Americans are fighting a war in nearby Afghanistan.
India also has an urbanizing consumer-driven economy and a growing middle class that indulges itself in cars, apartments and other goods. It is this economic progress that underpins India's rising geopolitical clout and its attractiveness to the United States as a global partner.
Gandhi is still revered here, and credited with shaping India's political identity as a tolerant, secular democracy. But he can sometimes seem to hover over modern India like a parent whose expectations are rarely met.
Mr. Obama, too, has experienced the clash of those lofty expectations with political realities. When he accepted the Nobel Peace Prize, even as he was conducting two wars, he described himself as "living testimony to the moral force" of the nonviolent movement embodied by Dr. King and Gandhi.
"But as a head of state sworn to protect and defend my nation," he continued, "I cannot be guided by their examples alone."
That paradox was on vivid display on Saturday when Mr. Obama arrived in Mumbai, an event carried live on national television, celebrating Gandhi's legacy but also selling military transport planes and bringing along 200 American business leaders.
India's political establishment, if thrilled by the visit, is also withholding judgment. Mr. Obama was faulted in New Delhi for some early missteps, including his comment that China should play an active role in South Asia. His battering in the midterm elections has raised concerns about his political viability. And many Indian officials still hold a torch for former President George W. Bush, who was popular for pushing through a landmark civilian nuclear deal between the two countries.
Mr. Obama's visit is intended to dispel those doubts and deepen a partnership rooted in shared democratic values. Since taking office, he has already met several times with Prime Minister Manmohan Singh, as well as with other delegations of Indian officials. On several occasions, he has cited his deep admiration for Gandhi, perhaps as evidence of his fondness for India.
In praising Gandhi, Mr. Obama has often cited the influence of Gandhi's civil disobedience campaigns on the civil rights movement in the United States. Dr. King visited India in 1959, more than a decade after Gandhi's death, seeking to draw from the taproot of his moral power, in a trip publicized in India and the United States.
"The trip for King was very much about laying claim to the Gandhian legacy," said Nico Slate, a historian at Carnegie Mellon University who has researched the linkage between the two men.
Unlike Mr. Obama, Dr. King and Gandhi had the advantage of never having to govern. And even Dr. King learned the limits of Gandhi's influence in an India confronted with the realities of global politics. When he was invited to make an address on Indian radio, Dr. King condemned the cold war arms race between the United States and the Soviet Union, suggesting that India should set a higher, Gandhian standard by demilitarizing. Indian officials quickly rejected the idea.
"It was very Gandhian, but in many ways very unrealistic, at least from the vantage point of the Indian establishment," Mr. Slate said. "Even King came to realize that India, in some ways, was never Gandhian."
Dr. King also visited Gandhi's home in Mumbai and, like Mr. Obama, signed the guest book. "Pretty cool," Mr. Obama said Saturday when a museum administrator showed him Dr. King's entry. "Nineteen-fifty-nine. What a great book."
On Sunday, Mr. Obama will fly to New Delhi and, like Dr. King, visit the Rajghat, the black marble memorial on the spot where Gandhi was cremated after his assassination in 1948. Today, the Rajghat attracts about 10,000 visitors a day and is a requisite stop for visiting foreign leaders, regardless of political ideology: Mr. Bush and former President Bill Clinton have visited. So has the Dalai Lama. But so has the Russian prime minister, Vladimir V. Putin; the president of authoritarian China, Hu Jintao; and, more recently, Senior Gen. Than Shwe, the leader of the ruling military junta in Myanmar.
Ramachandra Guha, a Gandhi biographer, said Indian officials approached him three months ago seeking suggestions for Gandhi-related sites for Mr. Obama's visit. Mr. Guha recommended an ashram in rural central India where Gandhi once lived, a suggestion rejected because of concerns over security and distance, he said.
To Gopalkrishna Gandhi, a grandson of Gandhi, the fact that his grandfather inspired the American president demonstrated the continued vibrancy of Gandhi's message. If he bemoaned the corruption and money contaminating Indian politics, he said Gandhi's spirit could still be found among the Indian civil society groups helping the poor and protecting the environment.
"Today, the need for a practical idealism is recognized throughout the world," he said.
The word practical seemed especially relevant.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.