US President Donald Trump said on Tuesday that issues involving the Citizenship (Amendment) Act are up to India and asserted that Prime Minister Narendra Modi wants people to have religious freedom.

Trump, who held comprehensive talks with Modi on the second and the last day of his visit, said these were great and fantastic two days.

"I'm gonna be not at all controversial because...I don't want to blow the two days plus two days of travel on one answer, one little answer, like John will ask me one simple question and you will blow it out and that will be the end of the trip. You wont even talk about the trip. So I will be very conservative in my answers if you don't mind," Trump said at a press conference.

Describing the Kashmir issue as a "big problem" between India and Pakistan, he said it is "a thorn in a lot of people's sides" and reiterated his offer to mediate between the two countries to ease the tension.

"If anything I can do to mediate, I will do," he said, adding that Pakistan figured in his talks with Modi.

"I have good equation with Pakistan PM Imran Khan. They are working to control cross-border terrorism," he said.

He said he discussed the issue of religious freedom at length with Modi during his comprehensive talks and that the Indian leader wants people to have this freedom.

"We discussed it. Prime Minister Modi said they work very closely with Muslims," Trump replied when asked if raised the allegations of discrimination against Muslims in India.

Trump described Modi as a "terrific" leader and India as a "tremendous country".

"We did talk about religious freedom. Prime Minister Modi wants people to have religious freedom in India...If you look back India has worked hard for religious freedom," Trump said.

To a question about India's new citizenship law, he said, "I don't want to say anything on CAA. It is up to India. I hope it will take the right decision for its people."

Asked if he discussed the incidents of violence taking place during his visit here, he said that he didn't discuss individual attacks and "that is up to India".

He also said that India is buying a lot of military hardware from the US.

On the issue of trade, he said India is probably the nation with highest tariffs and noted that the Harley Davidson has to pay "huge amount of tariff".

The US has to be treated fairly, he added.

He also talked about his country's peace deal with the Taliban with Modi, and said that India will like to see it happen.