US President Donald Trump hosts Thailand's junta leader at the White House on Monday, a rare instance of a military ruler being feted in Washington before even a nominal return to civilian rule.
The visit of Prime Minister Prayuth Chan-ocha comes three years after he seized power in a military coup, and days after the elected leader whose government he ousted was sentenced in absentia to five years in prison.
Human rights groups are outraged, but it gives a shot in the arm to US relations with its oldest ally in Asia, which has moved more into China's orbit since Washington scaled back ties because of the military takeover.
The Trump administration, like the Obama administration before it, maintains that relations with Thailand will only be fully restored when democracy returns.
But rolling out the red carpet for Mr Prayuth reflects a shift in US foreign policy priorities.
Mr Trump espouses a doctrine of "America First," prioritising US trade and strategic interests.
He is more willing to engage with anti-democratic leaders and less troubled by their human rights records.
That has not been lost on observers in Thailand, whose diplomatic relations with Washington date back to 1833.
Deep military ties were forged in the fires of the Vietnam War.
In an editorial, The Nation, a Thai newspaper, said the junta views the invitation to Washington "as a nod to legitimacy in the absence of an electoral mandate".
It contrasted that with president Barack Obama's disapproval of the coup, which "soured relations between our countries and forced the generals to lean heavily on China".
It is not that unusual for US presidents to meet autocrats in the Oval Office, but coup leaders are more contentious.
Perhaps the closest recent comparison to Mr Prayuth would be former Pakistani army chief Pervez Musharraf, who emerged as a close ally of President George W. Bush in the war on terror.
Mr Musharraf first visited the White House in 2002, three years after he seized power from an elected leader and before he had rammed through a national referendum to endorse his presidency.
Mr Trump has barrelled through criticism about outreach to authoritarian foreign leaders as he looks to shore up America's long-standing alliances.
He praised Philippines' President Rodrigo Duterte for his deadly war on drugs that has left thousands dead, according to a leaked transcript of an April phone call.
In the same month, Mr Trump welcomed Egyptian President Abdel-Fattah el-Sisi to the White House, something that Mr Obama avoided.
Mr el-Sisi had taken power in a 2013 coup and later was elected president.
Like Mr el-Sisi, Mr Prayuth has given up his military uniform. But he is still the head of a junta.
The military took power in 2014 to restore order after violent political turmoil in Thailand. The unrest has abated, but human rights groups say that has come at a heavy price in what used to be one of the most vibrant democracies in Asia.