Indian Prime Minister Narendra Modi hasn’t hidden his fondness for foreign leaders. He has embraced them, tweeted at them, and sent them birthday wishes—all in an effort to make India a global player in international affairs. So when Canadian Prime Minister Justin Trudeau, he of the perfect coiffure, high-voltage smile, and beautiful family arrived in New Delhi this week for a state visit, it should have been a perfect photo-op. Instead, neither Modi nor any of his senior ministers showed up to receive the Trudeaus.

Trudeau has smiled his way through India, however, meeting with business executives, signing billions of dollars worth of business deals, posing for photographs with Bollywood actors, and donning Indian attire befitting his own Indian wedding reception. The Indians, for their part, have denied the Canadian prime minister is being snubbed (one unnamed official went as far as to call it “protocol”). But a snub it is—and the diplomatic brush-off has its roots in an Indian separatist movement from the 1980s and present-day Canadian domestic politics.

In the 1980s, a Sikh separatist movement roiled the Indian state of Punjab, which, as India’s breadbasket, has always been among the wealthiest states. Sikhs are a minority in India. They make up about 2 percent of the country’s 1.2 billion people. But in Punjab, they are a majority, constituting about 60 percent of the state’s 27 million people. The militancy—and the government’s crackdown—was brutal. Bombs planted by militants went off in crowded markets, killing civilians. The Indian government’s response came through both its regular and paramilitary forces. Human-rights groups cited gross violations. Many prominent Indian officials, including Sikhs who make up a disproportionate amount of the military and police forces, were killed by the separatists. Top militant leaders were killed in the government’s response.

Four events stand out in the minds of those who lived through the era: In June 1984, Indira Gandhi, who was India’s prime minister at the time, ordered her troops to enter the Golden Temple, the holiest shrine in Sikhism, to flush out militants who had taken refuge inside. The military operation, which was called Operation Bluestar, was successful—in that the face of the Khalistan movement, as the separatist movement was called, was killed in the operation. But Sikh religious sentiments were incensed by the violation of the holy site, which was damaged in the assault. Less than five months later, Gandhi’s Sikh bodyguards shot her dead at her home. A massacre of Sikhs across India followed, and in parts of the capital, New Delhi, government officials oversaw the killings. (The issue remains sensitive in India because some of those people who oversaw the killings are still active in politics.) There was still more to come: In June 1985, an Air India flight from Toronto to Delhi blew up over the Atlantic, killing all 329 people on board. Investigators later found that the plot was hatched by Sikh militants in Canada as retaliation for the storming of the Golden Temple.

The Indian state ultimately crushed the Khalistan separatist movement—brutally. Those Sikhs who might have been sympathetic to the cause were integrated into the political mainstream. By the 2000s, the rebellion, Operation Blue Star, Gandhi’s assassination, and the bombing of the Air India plane were no longer as much of a driving force in Indian, or indeed Punjabi, politics. India even had a Sikh prime minister, Manmohan Singh, the respected economist, who was one of the architects of the country’s economic liberalization program. But if the Khalistan movement was no longer part of the political conversation in India, it remains a potent political issue in Canada.

Sikhs had migrated to Canada for decades, but the numbers swelled during the Indian government’s crackdown on the separatist movement in the 1980s. The community is still relatively tiny—about 1.4 percent of Canada’s 36 million people—but Sikhs are a significant presence in British Columbia (about 5 percent of the population) as well as in Ontario and Alberta (about 1.5 percent of the population in each province.) Many Sikhs are influential in Canadian politics and public life, such as Defense Minister Harjit Singh Sajjan and Jagmeet Singh, the leader of the left-leaning New Democratic Party. Some, but by no means all, of these Sikhs still support an independent Khalistan. More importantly, they vote—and are a key voting bloc in the country’s elections; so much so that any serious Canadian politician who visits India goes to the Golden Temple and prays. (Punjab is the largest source of Indian immigrants to Canada.) The issue of Khalistan has come up during previous visits to India by Canadian leaders, but with less of a dramatic impact in either country.

Trudeau’s Cabinet, as has been widely written about, reflects Canada’s diverse population. He has four ministers who are of Indian origin. All four are Sikh, including the defense minister. Trudeau has even boasted that he has more Sikh ministers than Modi. (He does.) But if Sikh officials in Punjab state are to be believed, all four Sikh-Canadian ministers are sympathetic to Sikh separatists. (All four are visiting India with Trudeau, who denies the allegation.) All this has not won Trudeau many political friends in India. But there was more to come Thursday. The public mood toward what should otherwise have been a mundane visit by a Canadian prime minister turned even more negative when it emerged that the Canadians had invited a Sikh separatist, now a Canadian citizen, convicted of the attempted murder of an Indian politician to a dinner with Trudeau at the Canadian High Commissioner’s residence in New Delhi. (It’s not clear how he obtained a visa to enter India.) The invitation was subsequently withdrawn.

“Obviously we take this situation extremely seriously,” Trudeau said. “The individual in question never should have received an invitation. As soon as we found out, we rescinded the invitation immediately.”

On the face of it, Trudeau’s visit might have generated the kinds of headlines planners in both countries dreaded. But as Shivam Vij wrote in the Washington Post, “for Trudeau, this trip is all about the Sikh vote in Canada.” The controversy over the trip helps the Canadian leader with a voting bloc that he covets. Without having done or said anything overtly—or even tacitly—supportive of the Khalistan movement, Trudeau will have shown Sikh Canadians that his primary loyalty is to Canada and Canadians—not to what the Indian government might want or think. Modi’s government, on the other hand, is walking a much finer line: ignore what its supporters see as Trudeau’s embrace of separatists and look weak or, alternately, protest loudly and remind many Indians of a separatist movement they’d long forgotten about.