Are you a friend or foe? That seems to be uppermost in President Donald Trump's approach to foreign policy in the first six months of office.
The probe at home into Russian interference in the 2016 U.S. election continues to be a thorn in his side, bedeviling Trump's apparent desire to have warm relations with Russia's Vladimir Putin, and the initial "bromance" with China's Xi Jinping also buckled under geopolitical and economic disagreements. But there are others who have been lavished with the president's favor.
Who is in the friend camp is clear from the president's foreign travels, actions and statements. To varying degrees, his support has emboldened favored countries to carry out contentious regional or domestic policies.
Some traditional U.S foes, though, could now find themselves in a more precarious position than they did under President Barack Obama, who generally avoided direct confrontation and even pursued diplomatic openings with Iran and Cuba.
Below, Associated Press journalists assess the friend-or-foe dynamic as seen from key nations:
In Trump Saudi Arabia trusts.
The ultraconservative Sunni kingdom played host to Trump's first overseas trip when it brought him and officials from other Muslim nations for an anti-terrorism conference in May.
Their embrace comes as no surprise as Trump long criticized the Iran nuclear deal, part of the reason for cold relations between the kingdom and President Barack Obama.
Trump also has been willing to overlook human rights concerns in his embrace of Mideast leaders, including Saudi King Salman and Egyptian President Abdel-Fattah el-Sissi.
Trump sent U.S. special operations forces into Yemen to back the Saudi-led campaign in a January raid that killed some 30 people, including women, children and a Navy SEAL.
Trump also has written tweets against Qatar and openly criticized the U.S. ally, host of a major American military base, amid a Saudi-led effort to isolate the country. That's even as members of his administration try to mediate an end to the rift.
King Salman's 31-year-old son, the recently appointed Crown Prince Mohammed bin Salman, was one of the first foreign officials to rush to America to see Trump. He has met several times with Trump's son-in-law Jared Kushner.
Now next in line to the throne, the crown prince likely hopes to trade on those ties in further cementing his interests in weaning the oil-rich kingdom from its crude-dependent economy as global energy prices remain low.
—Jon Gambrell in Dubai, United Arab Emirates
To Trump, Israel definitely falls into the most-trusted-friend category.
From early in his campaign, Trump cast himself as an unconditional supporter of Israel who would have a far warmer relationship with Prime Minister Benjamin Netanyahu than Obama did.
After repeated clashes with Obama, Israel's nationalist right had high expectations for Trump. His ambassador to Israel is David Friedman, a bankruptcy lawyer who has raised millions of dollars for the Beit El settlement. That community north of Jerusalem is in the heart of the occupied territory Palestinians want for an independent state.
A foundation run by the family of Trump's son-in-law Jared Kushner — the president's czar for Middle East peace efforts — also supported Beit El. Tax records show Trump himself donated money to a Jewish seminary in the settlement through his foundation.
Trump indicated his affinity by including Israel in his first overseas trip as president, where he was fawned over by his hosts. He speaks warmly about Netanyahu and has reportedly sided with him in spats with the Palestinians. He also encouraged Israelis by taking a tough stand on Iran.
At the same time, Trump has not made good on his campaign promise to move the American Embassy to Jerusalem and has spoken of pushing for the "ultimate deal," raising fears in Israel that it could be pressured into making unwanted concessions.
Meanwhile, the Palestinians have made efforts to get in Trump's good graces, with Palestinian President Mahmoud Abbas traveling to Washington to meet him and praise his leadership. But a new wave of violence over a disputed Jerusalem shrine, sacred to Muslims and Jews, is Trump's first experience of the decades-long conflict's realities. How his administration navigates it will be telling.
—Aron Heller in Jerusalem
Trump lavished praise on Poland during a visit this month, hailing its struggles for freedom against past oppression and depicting the country — which strongly opposes taking any Muslim refugees — as a defender of Western civilization. He made no mention of rule of law or human rights, even though the country's populist ruling party has spent the past 20 months consolidating power in ways that have weakened checks and balances.
Within days of the visit, the Law and Justice party moved to pass legislation aimed at giving the government vast new powers over the courts. One bill called for the immediate dismissal of all Supreme Court judges, giving the justice minister power to replace them. Among other things, the change would have given the ruling party direct control over confirming election results, one of the Supreme Court's functions.
This week the country's president responded to days of mass nationwide protests by vetoing two of three bills on the judiciary, including the one on the Supreme Court. However, he left in place a third bill that gives the justice minister the power to name the heads of all the country's lower courts, which critics also see as unconstitutional.
"Trump's silence about the Polish government's problems with democracy and the rule of law encouraged Warsaw to pursue further measures, effectively ending judicial independence and separation of powers soon after the presidential visit," said Marcin Zaborowski, a political analyst affiliated with Visegrad Insight, a journal about politics in Central Europe.
—Vanessa Gera in Warsaw, Poland
Trump hasn't yet torn up the Iran nuclear deal, which took the U.S. and other world powers years to negotiate and ended with Tehran accepting curbs on its contested nuclear program in exchange for sanctions relief.
Whether that remains the case is an open question.
Days into the Trump presidency, then-national security adviser Michael Flynn warned Iran that it was being put "on notice" following a ballistic missile test.
That hasn't stopped Iran from continuing to develop its weapons programs. In the past six months, it has unveiled new arms, staged military drills and launched a sea-deployed ballistic missile with a reported 185-mile range.
Last month, an Iranian patrol boat shined a laser at a U.S. Marine Corps helicopter flying over the Strait of Hormuz — an incident deemed dangerous by the U.S. military.
Trump considered declaring Iran in breach of the nuclear deal this month but ultimately confirmed it was in compliance. He'll have to revisit the issue in three months.
The administration has slapped Iran with new sanctions, however, including 18 this month targeting Iranian individuals and groups for aiding its non-nuclear weapons programs.
And it recently came out with a new warning, saying Tehran faces "new and serious consequences" unless it frees all U.S. citizens held there. They include Princeton graduate student Xiyue Wang, whose arrest nearly a year ago only came to light this month when he was sentenced to 10 years behind bars.
—Adam Schreck in Dubai, United Arab Emirates
There's not a lot of room for doubt on this one. North Korea is not only an enemy of the United States — a "sworn enemy" as the North Koreans put it — but the two are technically still at war, since the 1950-53 Korean War ended in what was supposed to be a temporary armistice.
Pyongyang made no secret of its anger at Washington's policy under Obama of keeping up sanctions and other pressure and refusing contacts. But in Trump's first six months, it seems to take even more umbrage at him — though his policy so far has been enunciated mostly just in chastising tweets.
The North is testing Trump in dramatic ways — most recently with its July 4 test of its first intercontinental ballistic missile.
Kim Jong Un's bold rush toward nuclear weapons and missiles capable of reaching the U.S. is in part intended to drive a wedge between Washington and Seoul — and Trump isn't helping to counter that very well. Instead, he has stepped on Seoul's toes by accusing it of not carrying enough of its own defense burden, and by hurriedly installing a controversial anti-missile system in South Korea before conservatives there lost the presidency in elections this spring. The system is partially deployed, but a full rollout has been delayed under liberal President Moon Jae-in for a environmental review.
For South Korea, one of Washington's most loyal allies, knowing where the U.S. president stands is absolutely key to its national security policy.
But right now, Kim Jong Un might well be the easier of the two men for Seoul to predict.
—Eric Talmadge, Pyongyang
Things haven't been good between the U.S. and Venezuela since then-President Hugo Chavez called then-President George W. Bush "the devil" in a 2006 speech at the U.N.
Obama avoided confrontation with Venezuela, instead encouraging dialogue between the government and opposition. Trump is threatening to launch "strong and swift economic actions" if Venezuelan President Nicolas Maduro moves ahead with the rewriting of the constitution, which Maduro's opponents fear would pave the way for a single-party, authoritarian state.
Those actions could include devastating sanctions on Venezuela's oil exports, or simply lengthening a list of top officials who can't do business with the United States. Maduro and his top aides insist they will go ahead with the election Sunday of a special assembly charged with the constitutional rewrite, a move that will reveal how tough Trump is willing to get.
The Trump administration has already imposed sanctions against Maduro's vice president and eight Supreme Court justices, with no measurable impact on the Venezuelan government's behavior. On Wednesday it targeted another 13 current or former top officials in Maduro's government.
The United States remains the primary source of hard currency keeping the Venezuelan government afloat, since Venezuela sends about half its total exports to the U.S. Restricting Venezuelan oil imports would undermine Maduro's government but would also increase hardship in the country and give Maduro an easier scapegoat for an already spiraling economic collapse.
Trump's continued use of sanctions against individuals may be a sign that Washington will stop short of a full-on economic confrontation, though Treasury Secretary Steven Mnuchin suggested more penalties could come if Maduro's government fails to change course.
—Michael Weissenstein in Caracas, Venezuela