(Photo: REUTERS / Ahmad Masood)U.S. President Barack Obama folds his hands in a traditional Indian greeting after he addressed a gathering at Siri Fort Auditorium in New Delhi January 27, 2015. Obama weighed in on one of India's most sensitive topics as he wound up a visit on Tuesday, making a plea for freedom of religion to be upheld in a country where relations between Hindus and minorities have come under strain.

U.S. President Barack Obama has added his voice indirectly to those urging Indian Prime Minister Narendra Modi to swiftly respond to religious persecution in the world's second most populous nation.

On the final stretch of his three-day State visit, Obama cast his thoughts on religious freedom, a hot-button issue in India, asking Modi's government to act on the matter as part of its commitment to constitutional liberty.

"India will succeed so long as it is not splintered along the lines of religious faith, as long as it is not splintered along any lines, and it is unified as one nation," Obama said in a town hall address hours before he set off for Riyadh.

While Obama did not make any specific reference to Modi throughout the address, the remarks were interpreted as a pointed message to the prime minister and the ruling Hindu nationalist Bharatiya Janata Party (BJP).

The BJP's rise to power in 2014 encouraged some of its supporters to declare India a nation of Hindus.

Minority religious groups say persecution has worsened in the country since Modi assumed office in May last year.

Lately, forced conversions among non-Hindus have triggered alarm among Christians, Muslims and members of other minority religions.

Hardliners with links to the BJP have insisted that Hinduism is in serious danger, and they have campaigned vigorously for non-Hindus to convert their faith.

About 20 percent of the country's 1.27 billion people belong to religions other than Hinduism.

"The message is that India is a democratic country, it is not a Hindu country or a Christian country, it is all together, India has respect for all religions," said Umer Ahmed Ilyasi, a Muslim imam who headed the All India Imam Organization. The imam was at the meeting where Obama spoke.

Obama likewise mentioned in his speech the treatment of women in the country, an issue that has plagued India since the disturbing gang rape and murder of a student on a bus in New Delhi in 2013

"Every daughter deserves the same chance as our sons," he said. "And 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. She deserves that."