As the international political order fragments, Theresa May flies from seeing Donald Trump, who speaks approvingly of the use of torture, to a meeting with President Recep Tayyip Erdogan who is presiding over the reintroduction of torture in Turkey.

The opportunism and hypocrisy of British foreign policy, as the UK flails around for new allies to replace the EU, is better illustrated by the Prime Minister’s Turkish trip than by her ingratiating speech to Republican Party leaders in Philadelphia. She told them that as close allies the US and UK would always win the war of ideas “by proving that open, liberal, democratic societies will always defeat those that are closed, coercive and cruel.”

Yet within 48 hours of adopting this high moral tone, May will be in talks with Erdogan which will be seen as endorsing the destruction of Turkish democracy; he is replacing it with a presidential system as dictatorial and repressive as anything seen in Latin America in the 1960s and 1970s. Since a failed military coup last July, a sweeping purge has seen at least 137,000 judges, teachers, journalists, civil servants and military personnel arrested or sacked, according to the government’s own figures.

Theresa May in America: The PM's first speech in 90 seconds

The mass arrests and trials include anybody who protests or dissents from government policy. Two Kurdish leaders, whose party won five million votes in the last election, face over 200 years in prison. A Human Rights Watch report into torture by the Turkish police cites a forensic specialist who says that a suspect related how “the police had forced him to sit on his knees, bent forward so his forehead touched the floor, with his hands tied on his back, for 36 hours. Whenever he tried to move, the police hit him on the head and the back with a belt.” The police then placed him in a cell with several enlisted soldiers who severely beat him. “There was not a part of his body that was not covered in bruises and he suffered from a frozen shoulder from the stress-position,” said the forensic specialist, though the detainee was too frightened to make an official complaint.

Erdogan will hold a referendum in April on the new presidential system in which all power is focussed on himself. But since he has closed down or taken over at least 150 news outlets and jailed 141 journalists, he is likely to win approval of legal changes that will strip almost all power from parliament and the judiciary.

It takes considerable cheek on the part of May to solemnly state just before her visit to Turkey that the US and Britain’s special relationship is rooted in “the promise of freedom, liberty and the rights of man”. An unpublicised motive for the trip is probably the prospect of a substantial Turkish order for Rolls Royce engines for a new Turkish fighter, though so many Turkish air force pilots have been purged that there are reportedly now too few to fly the existing aircraft fleet.

This is not May’s first visit to the political sewers of the Middle East. In December, she went to Bahrain, the tiny toxic sectarian island kingdom where a Sunni monarchy oppresses a Shia majority and 2,600 people out of a population of 65,000 are in jail. She told the kings of Bahrain and Saudi Arabia and the rulers of Kuwait, Qatar and United Arab Emirates, all arbitrary monarchs, that “we in the UK are determined to continue to be your partner of choice as you embed international norms and see through the reforms which are so essential for all of your people.”

May is alone in detecting these reforms, but her support for the Gulf States may have encouraged Bahrain to carry out on 15 January its first executions in six years. A firing squad shot three men who alleged that they had been tortured into making false confessions, according to Amnesty International.

British governments commonly defend the combination of pro-democracy rhetoric with practical support for the most vicious autocracies by claiming that they are not the moral arbiters of the world and must put the interests of their own country – often in the shape of a juicy arms contract – first.

Such government cynicism is traditional, but May’s speech to the Republican Party leaders on Thursday suggests that she and her government are underestimating the gravity and divisiveness of the political turmoil in the US. Up to the inauguration of President Trump, it was possible to believe that he was a populist nationalist demagogue, with good political instincts, whose views and actions would be sobered by high office and would in any case be restricted by constitutional and institutional limits on his power.

But the last week has shown this is not happening: Trump is becoming more, not less, paranoid and extreme. His petty and incoherent speech to the CIA, his obsession with the numbers attending his inauguration, his hostility to the press and his confrontation with Mexico suggest a man not only incapable of coping with contradiction, but somewhat demented and not fully rational. He and Erdogan may be similar in their authoritarian hubris – the Turkish leader applauded Trump for “putting in his place” a CNN journalist by refusing to take his question – but there is no evidence that Erdogan is insane.

The growing belief that the leader of the US may be unhinged is becoming a seriously destabilising factor in the US and around the world. This view is well put by the Turkish journalist Asli Aydintasbas who tweeted: “I really can’t handle American going so insane. One thing when we go astray, another when US sounds like it has lost its marbles.”

It is not only the US and Turkey which have their leadership problems. May presents herself as the hard-headed exponent of common sense, a Margaret Thatcher with a human heart, but, when her speeches are carefully read, they are almost as full of wishful thinking and nostalgia for a vanished American and British supremacy as those by Trump.

British politicians have been attracted for the last 75 years by the belief that they could be junior partners of the US. May evidently believes that the election of Trump as President offers an opportunity to ride the American tiger once again, giving the new administration a degree of international respectability while restraining its worst excesses. Of course, this will supposedly be very different from the blank cheque Tony Blair gave George W Bush which landed the UK in the Iraq and Afghan wars; May says there will be no return to the failed policies of “Britain and America intervening in sovereign countries”.