Washington: US President Barack Obama on Thursday said the "acts of intolerance" experienced by religious faiths of all types in India in the past few years would have shocked Mahatma Gandhi.

The comments by Obama came a day after the White House refuted suggestions that the US President's public speech in New Delhi in which he touched upon religious tolerance was a "parting shot" aimed at the ruling BJP.

"Michelle and I returned from India - an incredible, beautiful country, full of magnificent diversity - but a place where, in past years, religious faiths of all types have, on occasion, been targeted by other peoples of faith, simply due to their heritage and their beliefs - acts of intolerance that would have shocked Gandhiji, the person who helped to liberate that nation," Obama said in his remarks at the high-profile National Prayer Breakfast.

The US President, who has just returned from India, was referring to violence against followers of various religions in India in the past few years.

He, however, did not name any particular religion and said the violence is not unique to one group or one religion.

"Humanity has been grappling with these questions throughout human history. And lest we get on our high horse and think this is unique to some other place, remember that during the Crusades and the Inquisition, people committed terrible deeds in the name of Christ.

"In our home country, slavery and Jim Crow (racial segregation state and local laws) all too often was justified in the name of Christ," he said, addressing the gathering of over 3,000 US and international leaders.

"There is a tendency in us, a sinful tendency that can pervert and distort our faith. In today's world, when hate groups have their own Twitter accounts and bigotry can fester in hidden places in cyberspace, it can be even harder to counteract such intolerance.

"But God compels us to try.

"And in this mission, I believe there are a few principles that can guide us, particularly those of us who profess to believe," he said.

In a US-style Town Hall address in New Delhi on January 27, the last day of his India trip, Obama had made a strong pitch for religious tolerance, cautioning that India will succeed so long as it was not "splintered along the lines of religious faith".

The White House yesterday strongly refuted allegations that Obama's remarks on religious tolerance was aimed at the ruling Bharatiya Janata Party (BJP), saying the speech in its entirety was about the "core democratic values and principles" of both the US and India.