WASHINGTON (AP) — US President Donald Trump congratulated Turkey’s president for sweeping up more power. He hailed Egypt’s strongman leader as a “fantastic guy.” When China’s president visited, Trump touted a burgeoning friendship and made no public mention of Beijing’s dismal human rights record.

Since taking office, Trump has displayed a striking willingness to embrace autocrats as potential partners in his “America First” agenda, even if it means ignoring their heavy-handed tactics and repression at home. It’s a posture he also took toward Russian President Vladimir Putin until a dispute over Syria led him last week to declare US-Russian ties at an “all-time low.”

Trump is hardly the first US president willing to look the other way in dealings with governments that flout democratic values. For decades, Republican and Democratic administrations have cooperated closely with Saudi Arabia and China. President Barack Obama opened new diplomatic channels with Iran and Cuba, despite concerns about their repressive rulers.

But rarely are US presidents as warm and unabashed about their relationships with autocrats.

Trump’s comfort level seems to stem in part from his background in business, where the details of a deal mattered more than the negotiating partner and flattery can get results.

Following the results in a nationwide referendum that will determine his country's future destiny, Turkish president Recep Tayyip Erdogan acknowledges supporters prior to delivering a speech at the Presidential Palace in Ankara, April 17, 2017. (AFP/ADEM ALTAN)

Following the results in a nationwide referendum that will determine his country’s future, Turkish President Recep Tayyip Erdogan acknowledges supporters prior to delivering a speech at the Presidential Palace in Ankara, April 17, 2017. (AFP/ADEM ALTAN)

When they were forced to deal with imperfect allies, Trump’s predecessors, including Obama and George W. Bush, made a point of using the moment to promote American ideals. They often followed meetings with statements about human rights or gathered separately with advocates or opposition leaders.

On Monday, as international monitors and European allies voiced concerns about the slanted political playing field in Turkey’s referendum, the White House said Trump called Turkish President Recep Tayyip Erdogan to congratulate him on a victory that grants him more power. The message was at odds with Trump’s own State Department, which expressed unease about a referendum that allows Erdogan to fulfill his long-held ambition for a presidency with executive powers.

Erdogan’s government has imprisoned scores of Turkish journalists. And since a failed coup last year, Turkey has arrested thousands of others accused of possible involvement.

“The president’s number one job is to keep Americans safe,” Trump spokeswoman Sarah Huckabee Sanders said Tuesday. “And if he needs to work with countries like Turkey and others to do that, that’s his priority and what his focus is.”

The White House’s readout of the Trump-Erdogan call focused its concerns on the Islamic State and Syria’s civil war, which the US and Turkey are coordinating efforts on. Turkey is a US key ally against IS, even if its poorly controlled border has been a contributing factor in the group’s expansion across Syria and Iraq.

President Donald Trump welcoming Egyptian President Abdel Fattah el-Sissi to the West Wing of the White House, April 3, 2017. (Mark Wilson Wilson/Getty Images via JTA)

US President Donald Trump welcoming Egyptian President Abdel-Fattah el-Sissi to the West Wing of the White House, April 3, 2017. (Mark Wilson Wilson/Getty Images via JTA)

Rachel Rizzo, a NATO and Europe expert at the Center for a New American Security, said the Trump administration sees its Turkey relationship “purely as a national security issue in terms of needing their help fighting ISIS (IS) and with the migration crisis in Europe.”

“It seems they’re willing to look past human rights abuses,” she said.

Trump has praised Chinese President Xi Jinping since hosting him at his Palm Beach, Florida, resort — after sharply criticizing China’s economic policies as a candidate. He has linked his warmer approach toward Xi with his effort to secure greater help from Beijing in stopping North Korea’s nuclear program. “A trade deal with the US will be far better for them if they solve the North Korean problem!” Trump said on Twitter, recounting what he told Xi.

Trump has also locked arms with Egyptian President Abdel-Fatah el-Sissi, a former general who toppled the democratically elected President Mohamed Morsi, a Muslim Brotherhood member.

Obama never outwardly condemned Sissi’s takeover. But Obama kept Egypt’s leader at arm’s length, assailing Egypt’s human rights record and suspending some US military aid.

After winning November’s presidential election, Trump offered Sissi a different relationship. And when Sissi visited Washington this month, Trump told reporters the Egyptian president would be someone “very close to me.” A post-meeting statement cited their mutual commitment to fighting terrorism and strengthening Egypt’s economy, making no mention of Sissi’s crackdown on domestic opponents that has been widely condemned by international rights monitors.

US President Donald Trump speaks on the phone with Russia's President Vladimir Putin from the Oval Office of the White House in Washington, DC on January 28, 2017. (AFP/Mandel Ngan)

US President Donald Trump speaks on the phone with Russia’s President Vladimir Putin from the Oval Office of the White House in Washington, DC on January 28, 2017. (AFP/Mandel Ngan)

The pattern may have been set by Trump’s vociferous support for Putin. As a candidate and in his first weeks as president, Trump said Putin had been a strong leader and expressed a desire to work closer with Moscow, despite the cloud of an FBI investigation into allegations of Russian meddling in the US presidential election.

Even before this month’s Syrian chemical weapons attack and retaliatory US cruise missile strike, Trump’s administration had been souring on the Kremlin. Last month, it condemned Russia’s crackdown on anti-government protesters that included 1,000 arrests. “Detaining peaceful protesters, human rights observers and journalists is an affront to core democratic values,” a statement said at the time.

But Trump’s tack on Turkey appeared to undermine his own State Department, which before the Erdogan phone conversation with Trump spoke of “irregularities” in the Turkish referendum and “an uneven playing field during the difficult campaign period.” The White House’s statement on Trump’s call to Erdogan made no mention of those concerns.

Turkey’s strategic location between Europe and the Middle East, and its unique role as the only Muslim-majority NATO member, have long made it an indispensable American partner.

Obama, too, sought a close relationship with Erdogan, viewing him as a possible model for a new generation of Muslim leaders. He traveled to Turkey in his first year in office and spoke frequently with the Turkish leader. But as Erdogan moved to consolidate power in Turkey, his relationship with Obama soured.

Copyright 2017 The Associated Press