The remarkable thing is that Thai university students got as far they did with their invitation to Joshua Wong. They set up a commemorative forum, scheduled a day of media interviews, and planned addresses on two university campuses. And Wong felt confident enough that he took up the invite, journeying all the way to Bangkok.

In his engagements, Wong planned to share his experiences in the umbrella movement – as he had at universities in Taiwan, Japan, Britain, and the United States. But on this occasion, what was he walking into?

Thailand is one of the few countries in the world today still ruled by a military junta. Animated by the strife between “Thaksin-istas” and monarchists, the generals seized power through a coup in May 2014. They have shown little tolerance since for political activism.

Joshua Wong and the double standards of the Thai junta

Rather, the junta has clamped down on dissent, using a gradated framework of repression. Early on, this involved a diversionary “happiness” campaign mounted by comely lasses in camouflage-patterned skirts, intimating the junta’s tough love. Soon after, this hardened into bleak warnings and “attitude adjustment” sessions, meted out in detention centres. Finally, for those who persisted, the framework was enhanced by arrests for lese majeste, computer crimes, and sedition, swift proceedings in military courts, and rough incarceration.

It was even worse for students on October 6, 1976. Then, too a chapter in democratic development was coming to a close. Students at Thammasat University, one of the institutions where Wong had hoped to speak, rose up in protest. The military unleashed a variety of auxiliaries, including the ominously named Red Gaurs, a murderous vigilante force of hyper-royalists and former soldiers.

Activist Joshua Wong demands Hong Kong government response to blacklisting in Thailand

On that day, more than 100 students were massacred, shot, lynched, blown up, or beaten to death, right there on Thammasat’s graceful riverside campus and, over the road, on the greensward of Sanam Luang. In instigating this violence, the military set the pretext for mounting a coup that night. It was the 40th anniversary of this blood letting that Wong’s visit was meant to help commemorate.

So, in view of this legacy and the junta’s present-day record, how did Thai university students ever think that they could extend their invitation to Wong – a globally known activist from irksome Hong Kong?

Perhaps the students sensed that the junta had let down its guard, freeing up political space. Indeed, it is easy to imagine the military’s complacency: social forces have been put in deep freeze and a praetorian constitution has just been passed. Or perhaps, they calculated, the junta was distracted by a nail-biting royal succession. In any event, the junta misses anniversaries. It doesn’t check passenger lists. Accordingly, it was given a sharp prodding by Beijing.

Handed a blacklist, the junta snapped to, fretting over “Thailand’s relations with other nations”. Wong was thus met in the airport by a phalanx of nearly two dozen immigration officers. And then, even as flights embarked for Hong Kong, Wong was kept locked up, leaving him to ruminate anxiously alone over the laws he might have broken and the punishment he might get. Wong is indeed fortunate, then, that half a day later he was repatriated to Hong Kong, rather than renditioned to Ningbo.

Since his return, Wong has shown a knack for pragmatism. He has avoided inflaming Thai authorities further, acknowledging that they have “every right” to bar foreigners from entry. And in accepting their conditions that he neither disparage Beijing nor dwell on his detention, he was permitted to deliver a speech by video to the commemorative forum.

Thailand’s warning to Joshua Wong: video speech will be cut off if you criticise Beijing or reveal details of detention

Moreover, his remarks featured prominently on the front page of the Bangkok Post. The young secretary-general of Demosisto shows good judgment. He may have a lengthier political career than we had anticipated.

One does wonder, though, about what might become of Netiwit Chotiphatphaisal, the young student activist sent to welcome Wong. He gained attention some months ago after refusing to bow to a statue of King Chulalongkorn, located on the grounds of the eponymously named university. He has founded several organisations that are critical of Thailand’s deadening educational system. And together with other young activists, he organised the event that was to commemorate the slaughter at Thammasat. Back in Hong Kong, the worst that Wong faces is community service. In Bangkok, Netiwit may be up for attitude adjustment.

Thai activist invites Hong Kong’s Joshua Wong to address Bangkok students

But what of Beijing’s role in Thailand’s affairs and what should Hongkongers do? Mainland authorities ordered the abduction of a Hong Kong bookseller from Pattaya. And now, they have ordered the expulsion of a Hong Kong civil society leader at Suvarnahbumi. One of the few motors turning over in Thailand’s economy today is tourism. But Hongkongers contemplating yet another holiday in Thailand might ask themselves whether they are really wanted. The junta’s leader, General Prayuth Chan-ocha, claims he cannot distinguish between mainlanders and Hongkongers, for “they are all Chinese people”. But his grabbing at a blacklist and his deporting a democrat tells us that one of these groups is more welcome than the other.

William Case is Professor in the Department of Asian and International Studies at City University of Hong Kong