When President Trump spoke with Pentagon leaders early last month about U.S. troop levels in Afghanistan, he was anxious for a hefty reduction by Election Day in November, according to U.S. officials familiar with the discussion.

Reminded that withdrawals below the current level of approximately 8,600 — about the same as when Trump first took office — were contingent upon still-unmet conditions outlined in the U.S.-Taliban deal signed early this year, he questioned whether U.S. forces in Syria could be decreased.

Not advisable, Trump was told of the approximately 800 troops there, most still engaged in fighting the Islamic State and keeping Russia, Iran and Turkey from expanding their reach.

“I am sure they’re going to stay in [Syria] until the end of the year, beyond the election, regardless of who wins,” a senior U.S. official said in the wake of the meeting. U.S. and foreign officials spoke on the condition of anonymity to discuss the sensitive troop withdrawal issue.

Just weeks later, Trump announced that he was reducing U.S. deployments in Germany by 9,500, from the current total of 34,500.

Since taking office, Trump has been struggling to fulfill his 2016 campaign pledge to significantly reduce the nearly 200,000 American military personnel then overseas, already the smallest number in many decades. In countries such as Afghanistan, U.S. troops are merely serving as “police,” he has argued, while Germany, South Korea and others that could afford to defend themselves are getting U.S. protection on the cheap at taxpayer expense.

But Trump has been stymied at virtually every turn. While there have been some relatively minor shifts in distribution — and since 2017 the Defense Department no longer includes troops in Afghanistan, Syria and Iraq in its unclassified, published tallies — the overall total of those serving abroad is believed to have slightly increased since Barack Obama left office.

In the past, members of his own administration, including military leaders, have talked Trump out of specific withdrawals or employed delaying tactics. When the president ordered him in 2018 to tell Persian Gulf partners to send their own troops to Syria so the United States could get out, former national security adviser John Bolton wrote in his recent book, Bolton slow-walked the idea until it went away. Trump eventually cut the numbers by more than half, without any Arab replacements or financial contribution.

Trump has often said that he is treated unfairly. “I am the only person who can fight for the safety of our troops and bring them home from the ridiculous & costly Endless Wars, and be scorned,” he tweeted in October. “Democrats always liked that position, until I took it.”

The idea of bringing home the troops resonates with many across the political spectrum. But numerous lawmakers of both parties have objected to Trump’s efforts. Most recently, senior Republicans have warned that a major reduction in Germany would limit U.S. military flexibility in Europe and beyond, decrease U.S. influence in NATO and be a gift to Russia.

Late last month, Senate Republicans Lindsey O. Graham (S.C.), Marco Rubio (Fla.) and Mitt Romney (Utah) joined Democratic Sens. Christopher A. Coons (Del.), Tim Kaine (Va.) and Jeanne Shaheen (N.H.) in sponsoring an amendment to the fiscal 2021 Defense Authorization Act that would limit the use of funds to reduce active-duty troops in Germany unless the Defense Department could certify that a long list of restrictive conditions had been met.

At NATO, few diplomats believe that a significant troop pullback from Germany — a massive personnel and logistical undertaking — can be accomplished before the end of the year, or that the infrastructure exists to house them elsewhere in Europe. U.S. opinion polls detailing Trump’s plummeting popularity are being closely watched in alliance capitals and at the Brussels headquarters. NATO policymakers say that if Democrat Joe Biden is elected, they expect the troop reductions to be off the table.

German officials were furious at having learned of the planned cuts from U.S. media reports. Defense Secretary Mark T. Esper, attempting to allay concerns and smooth ruffled feathers, told NATO on a trip to Brussels in June that the plans were still far from completion, four diplomats familiar with his visit said.

One senior NATO diplomat said that Esper offered few details but promised to “continue to consult with allies. Like they have,” the diplomat added with a clear touch of sarcasm.

In the meantime, the official alliance position is that “the U.S. remains firmly committed to European security,” a NATO official said.

“What we have seen over the last years is actually not a decrease but an increase in the U.S. presence in Europe,” said the official, including a strong U.S. commitment to bolstering NATO’s eastern flank with rotating deployments and pre-positioned equipment.

Army Secretary Ryan D. McCarthy told reporters Thursday as he returned from a multi-stop visit to Europe that he had not had any “direct discussions about the repositioning of forces on the continent at this time.”

“That information will be released in the coming weeks,” he said. “That’s all I’ve got to say about that topic.”

McCarthy acknowledged that Poland and Lithuania have both expressed interest in having more U.S. troops in their countries if the United States is reshuffling its European profile. Polish President Andrzej Duda, a Trump favorite, last year offered to build a base there and name it Fort Trump.

When Duda visited the White House on June 24, four days before the first round of voting in his reelection bid, Trump granted his wish, saying vaguely that “some” of the forces to be withdrawn from Germany would go to Poland. Duda was narrowly reelected in a runoff vote last week.

Trump has long been harshly critical of Germany, charging that it is insufficiently grateful for U.S. “defense” and has failed to pay its fair share of NATO expenses. Explaining his plans for the 9,500 troops, he told columnist Marc Thiessen this month that “I’m bringing about half home and half are going to different places that deserve it,” including Poland.

Pentagon officials have said that the “repositioning” of forces around the world — in large part to confront China — is part of a comprehensive and long-overdue review of all U.S. overseas deployments expected to be completed in September.

Indications earlier this year that downsizing was likely in Africa, where U.S. forces are fighting militant groups, brought howls of congressional disapproval and warnings of Islamic State and al-Qaeda expansion there.

Military officials have long been expecting the U.S. troop footprint in the Middle East and Afghanistan to shrink at least modestly because of a trio of factors, including a reduced Islamic State, a hoped-for political settlement in Afghanistan and, perhaps most important, Trump’s desire to reduce U.S. involvement in insurgent conflicts.

But critics have warned that a reduced U.S. presence would conflict with the administration’s pledge to continue “maximum pressure” against Iran.

The first phase of the February U.S.-Taliban agreement — a downsizing of the American force in Afghanistan to 8,600 — has now been completed, eliminating the force expansion Trump authorized in 2017. The agreement envisions a full U.S. departure by the end of April, providing that the militants meet their commitments to reduce violence and embrace negotiations with the Afghan government.

The Pentagon has drawn up plans to reach a “waypoint” in its own compliance with the deal, perhaps by late fall, by withdrawing another 4,000 troops. But the required Taliban and Afghan government progress in implementing the political aspects of the agreement has slowed, and violence is on the rise.

In Iraq, administration officials have said the ongoing presence of U.S. forces, now numbering more than 5,000, is vital to continue training and assisting Iraq’s security forces against Islamic State outbreaks, and to help Iraq resist Iranian dominance.

Many Iraqi lawmakers demanded the full departure of American troops following the U.S. killing of Iranian military leader Qasem Soleimani in a Baghdad drone strike in January. Talks with the new government of Prime Minister Mustafa al-Kadhimi, who is due to visit Washington this month, are ongoing. Administration officials say they are optimistic and expect only a modest reduction in the force.

Since early in his presidency, Trump has demanded that South Korea, where 28,500 U.S. troops are based, and Japan, which hosts more than 55,000, pay more for a robust American military presence.

Washington and Seoul struggled to reach a cost-sharing deal in 2018. They ended up with only a one-year extension, to the end of 2019, with South Korea agreeing to pay $926 million, an 8 percent increase.

Last year, Trump asked for a fivefold increase in what South Korea pays and threatened to “get out of there if we don’t get the five-billion-dollar deal,” according to Bolton. No agreement has been reached, and in April more than 4,000 South Korean civilians employed at U.S. bases there were placed on unpaid furlough. They went back to work in June, after Seoul agreed to pay them in a $200 million stopgap measure.

The Wall Street Journal reported last week that the Pentagon has presented the White House with a list of options to reduce forces there. On Monday, Esper said during a think tank event that he had not ordered any troop withdrawals from the peninsula but was looking at potential adjustments to force levels worldwide.

Japan faces the same demand to pay more when its current cost-sharing deal runs out at the end of March. Formal negotiations have not yet begun, and Tokyo, which is closely watching the South Korea situation, is hoping to hold off at least until the U.S. elections.

Michael Birnbaum in Brussels, Simon Denyer in Tokyo and Dan Lamothe in Washington contributed to this report.