NEW DELHI - US President Barack Obama urged India to promote religious tolerance and do more to combat global warming Tuesday as he wrapped up a visit aimed at forging a new friendship between the world's largest democracies.
Speaking to an audience of mainly young people, Obama said the United States could be India's "best partner" but put pressure on his hosts over a range of political and social issues, including women's rights.
The US president also said their countries could forge "one of the defining partnerships of this century," even as he warned the war against climate change would not "stand a chance" without India.
The speech was the finale of a packed visit which has seen a dramatic upturn in an often troubled relationship, including the signing of a new "friendship" pact between Obama and Prime Minister Narendra Modi.
India's right-wing premier was a pariah in Washington less than a year ago, but has since developed a close bond with Obama, with their two countries keen to counter-balance the rise of China.
"India and the United States are not just natural partners - I believe that America can be India's best partner," said Obama after receiving a rapturous welcome from a group of around 1,500 people.
Obama, however, weighed in on two sensitive issues in India before departing for Saudi Arabia, saying women should not only have equal rights but be safe to "walk the street".
"Every woman should be able to go about her day, to walk the street, or ride the bus, and be safe and be treated with the respect and dignity that she deserves," he said.
India was rocked by the fatal gang-rape of a student in Delhi in 2012 that unleashed seething anger about high levels of sexual violence and a round of soul-searching about its treatment of women.
Obama also urged respect for religion in officially secular India, where the election of Hindu nationalist Modi has given rise to fears among the country's large Muslim minority.
"Every person has the right to practice their faith how they choose, or to practice no faith at all, and to do so free of persecution and fear of discrimination," he said.
"Nowhere is that more important than India, nowhere is it going to be more necessary for that foundational value to be upheld.
"India will succeed so long as it is not splintered along lines of religious faith, along lines of anything, and is unified as one nation."
Modi was treated as persona non grata in Washington for over a decade after deadly communal riots in Gujarat when he was state chief minister in 2002. Around 1,000 people were killed, mostly Muslims.
Both Obama and Modi have been at pains to demonstrate their personal rapport during the visit and announced a breakthrough on a long-stalled nuclear power deal on Sunday.
Obama was also chief guest at Monday's Republic Day parade - one of the biggest honours that India can bestow on a foreign leader.
The US is looking to reinvigorate alliances in the Asia-Pacific as part of Obama's "pivot" east, and has taken note of Modi's more assertive stance towards China.
Beijing claims sovereignty over large swathes of the South China Sea, home to maritime lanes that are vital to global trade, and is engaged in territorial disputes with a host of nations in the region.
But in his speech, Obama said "the freedom of navigation must be upheld and disputes must be resolved peacefully".
Curb climate change
Speaking after their talks on Sunday, Modi said he would not be pressured on climate change by any country - comments seen partly aimed at China after it agreed on new carbon emissions targets with the US.
But Obama warned the battle against global warming was doomed unless developing countries reduce dependence on fossil fuels.
"I know the argument made by some, that it's unfair for countries like the United States to ask developing nations and emerging economies like India to reduce your dependence on the same fossil fuels that helped power our growth for more than a century," Obama said.
"But here's the truth: even if countries like the United States curb our emissions, if growing countries like India - with soaring energy needs - don't also embrace cleaner fuels, then we don't stand a chance against climate change."
India has balked at committing itself to major cuts in carbon emissions ahead of a major climate summit in December, fearing they would undermine efforts to boost living standards in a country where much of the population of 1.2 billion live in poverty.
Obama and his wife Michelle spent 10 minutes mingling after the speech, shaking hands and posing for selfies as the crowd chanted "Obama, Obama".
The scenes underlined the turnaround in ties after a row involving the arrest and strip-search of an Indian diplomat in New York in 2013, which saw the Stars and Stripes being burned on the streets of Delhi.
Obama had been due to visit the Taj Mahal with Michelle Tuesday, but the trip was cut short after the death of the Saudi king.