There are few bigger celebrities in India than Shah Rukh Khan. Even at the age of 50, he remains a dominant force in Bollywood and not immune to a little self indulgence and narcissism.

But the actor responded with remarkable patience and grace after he was stopped at US customs this week – an experience that has now befallen the movie star on three occasions.

There was no explanation from US Customs and Border Protection as to why the star of Om Shanti Om, Chak de! India and Dilwale Dulhania Le Jayenge should been stopped at Los Angeles International Airport on Thursday.

“I fully understand and respect security with the way the world is, but to be detained at US immigration every damn time really really sucks,” he said on Twitter.

The US, keen to build a strategic and economic partnership with India, and home to a large population of immigrants from the subcontinent, immediately flew into damage control.

The US Ambassador to India, Richard Verma, rapidly said on social media: “Sorry for the trouble at LAX @iamsrk. We are working to ensure it doesn’t happen again. Your work inspires millions, including in the US.”

Yet this is not the first time Mr Khan, or other high profile Indians, have endured painful experiences at US immigration.

In November 2011, Washington apologised after former Indian President APJ Abdul Kalam was frisked at a New York airport. A year earlier, India’s ambassador to the US, Meera Shankar, was pulled from a security line and searched by a security agent in Mississippi.

The same month, another Indian diplomat, Hardeep Puri, was asked to remove his turban at an airport in Houston, Texas. When he refused to, on religious grounds, he was detained in a holding room.

All of the incidents, along with 2013 arrest and strip searching of another Indian diplomat in New York, caused deep anguish within India, and highlighted a sharp cultural disconnect. Indians, used to a culture of VIP and VVIP celebrity, could not understand how Americans could be so tone deaf and offensive. At Indian airports there are 32 categories of passenger – ranging from local official to foreign ambassador – who are not required to go through security whatsoever.

As a result, every incident was taken as an insult to the entire country, whether intended or unintended. It was inconceivable, Indians pointed out, that a major Hollywood star, or US official, would encounter such treatment on arrival in Delhi, Bombay or Bangalore.

Already, a right wing religious party based in the Indian city of Bombay has seized on Mr Khan’s treatment.

“This has been a common occurrence with Shah Rukh at most big US airports. Still, this tolerant actor goes to the US repeatedly, only to get insulted,” said an editorial in the newspaper of the Shiv Sena party.

“He should have returned, displaying patriotic credentials, and telling the US that ‘I won’t step into your country if you are going to insult me in this manner’.”

American officials, by contrast, sought to fall back every time on the robotic response that “rules are rules” and that they apply equally to everyone. And as news broke of Mr Khan’s latest hold-up, Nisha Biswal, the US assistant secretary of state for South and Central Asia, sought to suggest that nothing was amiss.

“Sorry for the hassle at the airport, @iamsrk – even American diplomats get pulled for extra screening,” she said.

Yet, the experience of Mr Khan, who is Muslim, ought to force the US to ask more penetrating questions of itself.

Shah Rukh Khan interview

With no small irony, when he was first detained, at Newark International Airport, in 2009, Mr Khan was in the US to promote his film My Name is Khan, which details the racial profiling of Muslims after the 11 September attacks.

In 2012, he was held in White Plains, New York, on his way to address students at Yale. “Whenever I start feeling too arrogant about myself, I always take a trip to America,” Mr Khan, who is estimated to have a net worth of $600m (£464m), told them.

As Mr Khan pointed out in 2013 when he wrote about his experiences at US airports, everybody is not treated equally. The incidents involving so many Muslims – visitors and citizens alike – being hauled aside for additional questioning or being asked to get off planes because they unnerve other passengers, suggests racial profiling by the security forces remains alive and well in the US 15 years after the Al-Qaeda attacks on New York and Washington.

Just this week, a Muslim woman sued the Chicago Police Department after being detained and strip searched as they mistook her for a potential “lone terrorist” because of her headscarf and backpack.

In 2013, the Bollywood star wrote about his experience and about the stereotypes he encounters as a Muslim with the last name of Khan, including his security run-ins at American airports.

“I became so sick of being mistaken for some crazed terrorist who coincidentally carries the same last name as mine that I made a film, subtly titled My Name is Khan (and I am not a terrorist) to prove a point,” he said.

“I wonder, at times, whether the same treatment is given to everyone whose last name just happens to be McVeigh (as in Timothy)??”

The US security services have a terribly difficult job. There are constant alerts and threats they are forced to respond to. Their actions have life or death consequences. At the same time, the ratcheting up of anti-immigrant and anti-Muslim rhetoric by the likes of Donald Trump does not help create a situation in which the issue can be dealt with calmly, dispassionately or humanely.

India, the US, and Shah Rukh Khan, will all get over this latest incident. But it should be a cause for contemplation and thought. Not a quick tweet.