The government's ended special status to Jammu and Kashmir in August last year (File)

Despite India rejecting it more than once, US President Donald Trump on Tuesday repeated his offer of mediating between India and Pakistan, saying: "India and Pakistan are working on their problem. My relationship with both PMs is strong. Anything I can do to mediate, I will."

President Trump made the comments during a press conference in Delhi, in response to a question on terrorism from Pakistani soil.

"We talked a lot about it at length today. No question it is a problem. They are working on it. I said I will do whatever I can do to help because my relationship with both gentlemen (Prime Minister Narendra Modi and Pakistan PM Imran Khan) is so good. Anything I can do to mediate, I would do," he said.

"They (Pakistan) are working on Kashmir. Kashmir has been a thorn in lots of people's sight for a long time. There are two sides to every story. We discussed terrorism at length today," added the American President, who arrived yesterday for a 36-hour visit, his first ever.

He also threw in more words of praise for PM Modi, saying he "is a strong man, I have seen him in action, he will take care of it."

Later, asked about previous times when he spoke about mediation and India rejecting his offer, Trump demurred: "I didn't say anything about that (being mediator). Kashmir obviously is a big problem between India and Pakistan, they are going to work out their problem. They have been doing it for a long time."

President Trump also responded to questions on the Citizenship (Amendment) Act (CAA), the clashes in Delhi and religious freedom.

On CAA, he said: "I won't discuss the CAA, I'll leave that up to India and hopefully they will do the right thing."

Earlier, he spoke a little more about religious freedom and his discussions with PM Modi. "We did talk about religious freedom. The PM said he wants people to have religious freedom. They have worked really hard on it."

"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.

Asked about the violence in Delhi's northeast between groups for and against the citizenship law, in which 100 have been injured, he said: "I heard about the individual attacks but I did not discuss it. It is up to India."

In his short visit, President Trump addressed a huge gathering at a cricket stadium in Ahmedabad with PM Modi and visited the Taj Mahal in Agra before travelling to Delhi for bilateral talks.