Thailand's military government is shoring up diplomatic ties with Asian neighbors to provide a counterweight to criticism from the West about its seizure of power in May and its reluctance to set an early date for a return to civilian rule.
In the latest move, acting Foreign Minister Sihasak Phuangketkeow reassured Cambodian Prime Minister Hun Sen on Tuesday that Cambodian workers who had fled home after the coup, fearing a crackdown on immigrants, would be welcomed back.
He returned from Cambodia on Wednesday, bringing with him Thai activist Veera Somkwamkid, an ultra-nationalist jailed there on charges of espionage and illegal entry for pressing Thailand's claim to a disputed ancient temple on the border.
The May 22 military takeover drew swift international condemnation and both the United States and European Union have downgraded diplomatic ties.
The military's National Council for Peace and Order has played down these moves, focusing instead on strengthening its relationship with China and others in Asia.
Last month, a Thai army delegation visited China and
Malaysia's defense minister came to Thailand, the first visit by a foreign minister since the coup. Myanmar's army chief is due in Bangkok on Friday.
The military authorities also claim support from Vietnam.
Veera received a hero's welcome at Bangkok's Suvarnabhumi airport on Wednesday from supporters shouting "Veera! Fight! Fight!" as he made his way through a media scrum.
Cambodia's pardon for the Thai activist suggests a thaw in relations between old foes and a 180-degree change in stance by veteran Cambodian Prime Minister Hun Sen.
Hun Sen rattled Thailand in 2009 when he appointed former Thai premier Thaksin Shinawatra as an economic adviser and refused to extradite him. Thaksin was ousted by the military in 2006 and fled Thailand to escape a graft conviction in 2008.
"This is a gentleman's agreement between Cambodia and Thailand's military government not to interfere in each other's politics," said Kan Yuenyong of the Siam Intelligence Unit think tank.
"Cambodia has no reason to interfere in Thailand right now but in the past Hun Sen used politics to manipulate the land dispute issue."
Thailand and Cambodia have been locked for decades in a dispute over land surrounding the Preah Vihear temple. The International Court of Justice ruled in 2013 that Cambodia had sovereignty over the immediate area around the temple.
"Regional neighbors in Asia know that it is of economic benefit to them to take a soft approach to the Thai military," analyst Kan added.
Thaksin's sister, Yingluck Shinwatra, won a landslide election victory in 2011 but, after months of street demonstrations aimed at toppling her, she was forced to step down on May 7 when a court found her guilty of abuse of power.
Attempts by her government to secure Veera's release had proved unsuccessful despite cordial relations between Yingluck's government and the authoritarian Hun Sen, in power since 1985.
The junta has cracked down hard on dissent, briefly detaining hundreds of activists, journalists and politicians critical of the regime, a disproportionate number of them members of the pro-Thaksin "red shirt" movement.
On Tuesday, police released Sombat Boonngamanong, a red shirt activist who spearheaded an online campaign promoting flash mob protests against the military, after charges of lese-majeste were brought against him.
Sombat has also been charged with instigating unrest and violating cyber laws and faces up to 14 years in jail if found guilty by a military court.
Thailand has some of the toughest lese-majeste laws in the world forbidding criticism of the monarchy. Coup leader General Prayuth Chan-ocha, a staunch royalist, has made it clear that anti-royalist opinions will not be tolerated.
King Bhumibol Adulyadej, 86, the world's longest serving monarch, commands great respect and has semi-divine status. The monarchy is considered one of the three main pillars of the country along with Buddhism and the concept of nation.