Criticised by the West for seizing power, Thailand's army said Friday that it had won the backing of Myanmar's military, which ruled with an iron fist for decades.
The Thai Armed Forces Office said in a statement that Myanmar's visiting army chief Min Aung Hlaing was "confident that the Thai military's actions are appropriate".
"The military's crucial mission is to protect national security and public safety," he was quoted as saying.
A smiling Min Aung Hlaing was photographed wrapping his arms around Thailand's Supreme Commander Thanasak Patimaprakorn in a friendly embrace.
He later held talks with Thailand's coup leader and army chief General Prayut Chan-O-Cha, but did not appear before the media to make a public declaration of support for the junta.
For decades, former military-ruled Myanmar was treated as a pariah state by the West, but since a nominally civilian government took power in 2011, the Southeast Asian nation has been lauded for its dramatic reforms.
Thailand's coup makers meanwhile have been chided by the United States and the European Union for grabbing power from an elected government in May, spurring the junta to strengthen ties with Asian neighbours instead.
The Thai military has curtailed civil liberties, banning public protests, while also seeking to "return happiness" to the people with measures such as free film screenings and television broadcasts of World Cup matches.
During Friday's talks, Thailand assured the Myanmar general that it would take care of migrant workers from the impoverished country, after an earlier threat to arrest illegal labourers triggered an exodus of Cambodians.