Deafening drums marked the entrance of Donald Trump and Indian prime minister Narendra Modi as they clasped hands and walked across the stage in a packed Texas stadium on Sunday, sending a message of unity between the world’s two largest democracies despite trade tensions.

Trump highlighted the growth of US exports to India, the billions of dollars spent by India on US-made defense equipment and joint military exercises with New Delhi.

“India has never invested in the United States like it is doing today,” he said, adding that “we’re doing the same thing in India.”

The president also discussed border security, an important campaign issue for Texas, which shares a border with Mexico.

“We are taking unprecedented action to secure our southern border and stop illegal immigration,” Trump said.

About 50,000 Indian Americans attended the “Howdy Modi!” rally in Houston, where the crowd chanted “Modi! Modi! Modi!” as he took the stage to introduce Trump as “my friend, a friend of India, a great American president”. Modi even used Trump’s political slogan to say the president had a strong resolve to “make America great again.”

“When I met him for the first time, he said to me ‘India has a true friend in the White House,’” Modi said. “Mr President, this morning in Houston, you can hear the heartbeat of this great partnership in this celebration of the world’s two largest democracies.”

The event had the feel of one of Trump’s campaign rallies, complete with a packed venue and a roaring crowd, and Trump treated it that way at times. He ticked off his accomplishments in office, highlighted a drop in the unemployment rate among Indian Americans and extolled their contributions to the US as he pitched for their vote in a Republican state Democrats have visions of winning next year.

Trump said Modi invited him to the rally – one of the largest US gatherings of the Indian diaspora in history – when they met last month in France, and Trump seemed to explain his decision to attend by saying: “I love India.”

Earlier this year, Modi won the biggest reelection India has seen in years and his support for Trump could help the president at the polls next year. The two are to meet Tuesday on the sidelines of the UN General Assembly.

Trump is also scheduled to meet this week with Pakistani leader Imran Khan, who recently solicited his help mediating the Pakistan-India conflict over Kashmir. India’s government has stripped the disputed Himalayan region of its semi-autonomy and launched a security crackdown last month.

Crowds chant as they wait for Modi and Trump. Photograph: Patric Schneider/EPA

Trump said US-India bonds are expanding despite tensions over India’s trade surplus with the US. In June, the US canceled special trade privileges that had allowed India to export certain goods with lower tariffs. India responded by slapping tariffs on more than two dozen US goods.

The US and India are discussing ways to negotiate at least a partial trade deal, which would let the president score a victory as he campaigns for re-election. A partial deal could include Washington reinstating India’s special tariff status in exchange for concessions related to access to Indian markets, possibly in dairy and medical devices. Other issues are thwarting efforts to sign a larger trade deal.

In an address in Hindi to “my family”, Modi briefly mentioned the trade talks and expressed hope that an announcement can be made while he and Trump participate in the UN gathering.

Modi said that while Trump has called himself a “tough negotiator”, he has learned a few things from Trump about the art of making deals. After the speeches, Modi asked Trump to walk hand-in-hand around the perimeter of the stadium floor, looking up to the stands of cheering fans.

After the Houston event, Trump flew to Ohio, a key state in the 2020 presidential race. He and Australian prime minister Scott Morrison were to mark the opening of an Australian-owned Pratt Industries plant in Wapakoneta. Trump hosted Morrison and his wife, Jenny, on a state visit last week.

In Texas, Trump was briefed on recent storm flooding in the south-eastern part of the state when he stopped at a US coast guard station. Authorities blame the storm for at least five deaths.