President Donald Trump once again offered to mediate the tense situation in Kashmir, where he observed there have been heavy armed confrontations for decades and said 'a lot has to do with religion.'

'Kashmir is a very complicated place. You have the Hindus and the Muslims and I would say they wouldn't get along so great, and that's what you have right now' Trump told reporters while speaking about the region.

'You have millions of people that want to be ruled by others, and maybe on both sides, and you have two countries that haven't gotten along well for a long time. And frankly it's a very explosive situation,' the president said.

'I will do the best I can to mediate or do something,' Trump said.

President Donald Trump says that this weekend he will talk to Indian Prime Minister Narendra Modi about mediating in the Kashmir conflict

They are not exactly friends at this moment,' he said of India and Pakistan, who have had tense relations since their founding under partition.

Speaking a day after phone calls with the premiers of both countries, Trump said he was happy to try and help calm the situation in Kashmir where tensions have spiked since India revoked autonomous rule in the part of the region it controls on August 5.

'Kashmir is a very tough situation. We're talking about – this has been going on for decades and decades,' Trump said, saying there had been 'tremendous problems' between India and Pakistan over the disputed territory.

'I don't mean like shooting a rifle, I mean like major shooting of howitzers, of heavy arms. it's been going on for a long period of time.'

'A lot has to do with religion. Religion's a complicated subject,' said Trump.

Pakistani Prime Minister Imran Khan gestures as he addresses the Azad Kashmir parliament on Pakistan's 72nd Independence Day in Muzaffarabad, Pakistan-administered Kashmir, August 14, 2019

Trump said he would likely see Indian Prime Minister Narendra Modi during a weekend trip to France

Trump offered Tuesday to mediate the 'explosive' situation in Kashmir amid mounting international concern over a flare-up in violence between India and Pakistan in the divided region.

His comments came as Pakistan said three of its civilians died in Indian gunfire from across the de facto border in Kashmir known as the Line of Control.

And the Press Trust of India news agency quoted officials as saying one Indian soldier died and four were wounded when Pakistani troops opened fire on forward posts and villages along the LoC in the Poonch district on Tuesday.

Both India and Pakistan are nuclear powers and the situation in Kashmir is further complicated by the fact that China also claims part of the Himalayan region.

Trump -- who has previously spoken of his willingness to mediate -- said he would raise the situation over the weekend with Indian Prime Minister Narendra Modi. Both men are expected in France for a summit of the Group of Seven industrialized nations.

'Kashmir is a very complicated place. You have Hindus and you have the Muslims and I wouldn´t say they get along so great,' Trump told reporters at the White House.

'I will do the best I can to mediate,' he added.

At least 4,000 people have been detained in Indian-controlled Kashmir since early August when authorities imposed a communications blackout and restricted freedom of movement in the region.

Kashmiri refugees in Pakistan-administered Kashmir burn an Indian flag during a protest in Muzaffarabad on August 20, 2019

Pakistanis demonstrate against India's stripping the disputed Kashmir region of its special autonomy

Pakistani activists carry placards protesting India's stripping of Kashmir of its special autonomy status

President Donald Trump shakes hands with Pakistani Prime Minister Imran Khan during a meeting in the Oval Office of the White House, Monday, July 22, 2019, in Washington

A senior US official, who has just returned from a visit to the region, called on India Tuesday to quickly release detainees and restore basic liberties.

'We continue to be very concerned by reports of detentions, and continued restrictions on the residents of the region,' the State Department official told reporters.

'We urge respect for individual rights, compliance with legal procedures and an inclusive dialogue,' said the official, who spoke on condition of anonymity.

Both India and Pakistan have controlled portions of the former princely state of Kashmir since independence in 1947. The dispute over the Muslim-majority region has been the spark for two major wars and countless clashes between them.

- Johnson speaks to Modi -

Earlier this year they again came close to all-out conflict, after a militant attack in Indian-held Kashmir in February was claimed by a group based in Pakistan, touching off tit-for-tat air strikes.

India has bristled at any suggestion of foreign mediation and strenuously denied a claim by Trump last month that Modi had invited him to act a peacebroker.

It was also left seething when the UN Security Council held its first formal meeting on Kashmir in nearly half a century last week, saying it would not accept 'international busybodies ... tell(ing) us how to run our lives.'

British Prime Minister Boris Johnson told Modi in a phone call on Tuesday that the Kashmir dispute must be resolved between India and Pakistan alone.

Johnson 'made clear that the UK views the issue of Kashmir as one for India and Pakistan to resolve bilaterally. He underlined the importance of resolving issues through dialogue,' a spokeswoman for his Downing Street office said.

But in a further sign of the international concern about the situation, officials in France said that President Emmanuel Macron would bring up Kashmir with Modi when the two meet in Paris ahead of the G7 summit.

In justifying the scrapping of Kashmir's autonomy, Modi said last week that 'fresh thinking' was needed after decades of bloodshed in Kashmir. But his decision provoked a widespread backlash and there have been several rallies in the regional capital Srinagar attracting thousands of demonstrators.

Last month, during his first meeting with Khan, Trump said India's Modi had asked him to mediate in a prior conversation.

'He actually said would you like to be a mediator or arbitrator. I said where? He said Kashmir. Because this has been going on for many, many years. I was surprised at how long,' Trump said.

'I think they'd like to see it resolved and I think you'd like to see it resolved,' he continued at the time. 'And if I can help, I would love to be a mediator.'

India's foreign ministry did not agree with his characterization.

'We have seen @POTUS's remarks to the press that he is ready to mediate, if requested by India & Pakistan, on Kashmir issue. No such request has been made by PM @narendramodi to US President,' wrote Raveesh Kumar, India's Ministry of External Affairs spokesman, last month.