Trump departed having cemented his close friendship with Indian Prime Minister Narendra Modi , upon whom he lavished praise during public appearances over the course of his 36-hour visit.

But Trump was frank that Modi puts up a tough trade fight and that their disagreements on tariffs and deficits wouldn't be resolved in the near-term.

And he made no reference when standing alongside Modi of the contentious situation gripping India over the status of Muslims in the Hindu-majority society. Hours before Trump arrived in the Indian capital, violent clashes between supporters and opponents of Modi's Hindu nationalist stance left more than seven people dead.

The Trumps board Air Force One as they leave for India on Sunday, February 23.

The Trumps board Air Force One as they leave for India on Sunday, February 23.

Trump holds a string while viewing a charkha, or spinning wheel, during a visit to the Gandhi Ashram in Ahmedabad.

Trump holds a string while viewing a charkha, or spinning wheel, during a visit to the Gandhi Ashram in Ahmedabad.

Workers clean a bulletproof-glass enclosure around the podium before the rally started on Monday.

Workers clean a bulletproof-glass enclosure around the podium before the rally started on Monday.

Members of the US Secret Service and the Indian Special Protection Group stand guard during the rally.

Members of the US Secret Service and the Indian Special Protection Group stand guard during the rally.

The Trumps are greeted by performers wearing traditional costumes as they arrive at Agra Air Base on Monday.

The Trumps are greeted by performers wearing traditional costumes as they arrive at Agra Air Base on Monday.

The President and the first lady pose for a photo during a visit to the Taj Mahal in Agra, India, on Monday, February 24.

The President and the first lady pose for a photo during a visit to the Taj Mahal in Agra, India, on Monday, February 24.

A student applies vermilion powder on the first lady's forehead as she visits a secondary school in New Delhi on Tuesday.

A student applies vermilion powder on the first lady's forehead as she visits a secondary school in New Delhi on Tuesday.

Trump reviews a guard of honor Tuesday during a reception at Rashtrapati Bhavan, the presidential palace in New Delhi.

Trump reviews a guard of honor Tuesday during a reception at Rashtrapati Bhavan, the presidential palace in New Delhi.

Trump shakes hands with Modi during a news conference in New Delhi on Tuesday.

Trump shakes hands with Modi during a news conference in New Delhi on Tuesday.

Melania Trump, seen in the background, cheers as a boy does an impromptu dance at a New Delhi school on Tuesday.

Melania Trump, seen in the background, cheers as a boy does an impromptu dance at a New Delhi school on Tuesday.

Trump takes questions during a news conference in New Delhi on Tuesday. The President said ties between the United States and India has reached historic strength. "It has never been as good as it is right now," Trump said, citing his personal bond with Prime Minister Narendra Modi. "We feel very strongly about each other. We have done something that is very unique."

Trump takes questions during a news conference in New Delhi on Tuesday. The President said ties between the United States and India has reached historic strength. "It has never been as good as it is right now," Trump said, citing his personal bond with Prime Minister Narendra Modi. "We feel very strongly about each other. We have done something that is very unique."

Trump and his wife, Melania, stand with Indian President Ram Nath Kovind and his wife, Savita, as the National Anthem is played before Tuesday's state banquet.

Trump and his wife, Melania, stand with Indian President Ram Nath Kovind and his wife, Savita, as the National Anthem is played before Tuesday's state banquet.

US President Donald Trump offers floral respects at Raj Ghat, the memorial for Mahatma Gandhi, on Tuesday, February 25.

US President Donald Trump offers floral respects at Raj Ghat, the memorial for Mahatma Gandhi, on Tuesday, February 25.

Trump said during a later news conference that he had raised the issue of religious freedom with Modi in their private talks. But he described the prime minister's answer as "incredible," leaving doubt he raised forceful objections.

Trump's visit will be remembered more for the images it produced: a crowd topping 100,000 cheering for him at a campaign-like stadium rally, a softly lit tour of the Taj Mahal , and multiple homages to Mahatma Gandhi, the Indian independence leader famous for his humility.

"This has been a very special visit -- unforgettable, extraordinary," Trump said alongside Modi during an afternoon statement from the gardens of Hyderabad House. "What can you say? Very, very wonderful to be with you."

The pair didn't answer questions; Modi does not make himself available for news conferences in his own country. Trump convened his own news conference later in the day where he repeated his praise of the Indian leader.

Tempered expectations

There were tempered expectations heading into Trump's visit for major breakthroughs on trade or other matters. Trump acknowledged before he departed that a trade deal wasn't likely before November's presidential election.

Trump said during his raucous rally in northwestern Gujarat State on Monday that talks were still in their early stages.

"I am optimistic that, working together, the prime minister and I can reach a fantastic deal that's good and even great for both of our countries," Trump said. "Except that he's a very tough negotiator."

Trump is eager to reduce the trade deficit with India, and has applied tariffs on steel and aluminum that set off a cascade of retaliatory actions. Trump eventually stripped the country of preferential trade status , igniting anger among Indian officials.

He said Tuesday he was "optimistic" a trade pact could be reached eventually, and claimed ties between the US and India had reached historic strength.

"It has never been as good as it is right now," Trump said, citing his personal bond with Modi as the underpinning. "We feel very strongly about each other. We have done something that is very unique."

Trump and Modi announced some modest agreements on defense and security, including the purchase of $3 billion worth of American military helicopters and other equipment for its Navy. The pair also outlined new agreements for energy purchases and a joint mental health initiative.

But as the elaborate state visit came to a close, its outcome appeared more about optics than policy.

"The last two days have been amazing in every sense of the word," Trump said at the start of his meetings, held in a long hall inside Delhi's Hyderabad House.

Flush with ceremony

JUST WATCHED Here's what you should know about US-India relations Replay More Videos ... MUST WATCH Here's what you should know about US-India relations 03:01

Earlier the President was welcomed with flourish to the red-dirt forecourt of Rashtrapati Bhavan, the presidential palace, as his presidential limousine was escorted by riders on horseback. He reviewed cordons of troops and listened to the US and Indian national anthems underneath a red canopy.

After removing his shoes, he lay a wreath and planted a tree at Raj Ghat, the memorial to Gandhi. Alongside the first lady, Trump flung handfuls of red and yellow pedals on Gandhi's memorial before tossing spadefuls of dirt onto a sapling.

The repeated nods to the famously modest Gandhi seemed somewhat incongruous for a president famous for his wealth and ostentation. Gandhi's vision of a secular India where Hindus and Muslims co-exist peacefully has also recently come under challenge by reforms Modi insists are necessary to prevent terrorism.

Trump and Modi are largely aligned in their tough stance against Islamic extremism, including efforts like Trump's travel ban that disallow residents of Muslim-majority nations from entering the United States.

Modi has come under sharp criticism for steps that his critics fear could deny Indian Muslims citizenship, which prompted the deadly street protests in Delhi

American officials have expressed concern about the law, fearing it could amount to anti-Democratic backsliding. In his remarks on Monday, Trump made broad references to India's history as a pluralistic democracy, noting it's a country where people of multiple faiths "worship side by side in harmony."

But he did not directly raise the issue during his multiple public appearances with Modi, and in his Ahmedabad speech Trump said "every nation has the right to secure and controlled borders."

He declined to take a public position on the citizenship law during his news conference, saying he preferred to "leave that to India."

Before he departed, senior US administration officials said Trump would confront Modi over the proposed law, as well as his steps to strip the contested Kashmir region of special autonomous status.

But it appeared unlikely he'll be able to sway Modi from his views. While Trump has offered in the past to help mediate the longstanding Kashmir dispute between India and Pakistan, Modi has rebuffed his overtures.

Trump said during his news conference he was still available for mediation.

"Kashmir has been a thorn in both sides for a long time," he said. "There are two sides to every story."