The United States has about 1,000 more troops in Afghanistan than it has disclosed, according to US, European and Afghan officials.

White House officials have repeatedly claimed that the number of US troops in Afghanistan is 2,500, but informed sources revealed that number is actually around 3,500.

A thousand troops may seem like a small number compared to the roughly 100,000 who were there at the height of the war. But the scope of the US presence has become a contentious issue in Afghanistan — where the Taliban want the Americans gone, while the government’s beleaguered security forces rely on US air support — and also in Washington.

The cloudy accounting around the troop numbers results from some Special Operations forces having been put “off the books,” according to a senior US official, as well as the presence of some temporary and transitioning units. These troops, according to a second US official, include Joint Special Operations Command units, some of them elite Army Rangers, who work under both the Pentagon and the CIA while deployed to Afghanistan.

According to the New York Times, having more troops in a country than the Defense Department officially acknowledges is common practice. From Syria to Yemen to Mali, the United States often details military troops to the CIA or other agencies, declares that information “classified” and refuses to publicly acknowledge their presence.

So last year, as former President Donald J. Trump pushed for rapid troop withdrawals from Afghanistan, the Defense Department and other national security agencies used familiar methods to move numbers around, which made troop levels seem to be dropping faster than they really were. It was comparable to what happened in 2019 when Mr. Trump wanted to pull forces from Syria, US officials said.

The Obama administration used similar sleights of hand under the bland, bureaucratic term “force management levels,” which resulted in more troops in war zones with little public oversight.

“We’ve seen this movie before,” said Laurel E. Miller, a former top State Department official who worked on Afghanistan and Pakistan diplomacy for former President Barack Obama and for Mr. Trump. “To some extent, the fudging of the numbers reflects the arbitrariness of political fixation on declaring specific numbers.”

So, officially, the Pentagon insists that troop numbers are lower. “We are still at 2,500” in Afghanistan, Maj. Rob Lodewick, a Pentagon spokesman, said in an email to The New York Times on Friday.

What US forces remain in Afghanistan are stationed at roughly a dozen bases and consist mostly of Special Operations troops advising Afghan units at the headquarters level, as well as flight and support crews for aircraft. In southern Afghanistan, US jets fly overhead almost nightly.

Since this time last year, US troop numbers in Afghanistan have declined from 12,000 to the current number. That drop was staunchly opposed by Pentagon leaders, who have long said that at least 8,600 US troops are needed, both to support the Afghan forces and to conduct counterterrorism missions.

But a review of the US-Taliban deal by the Afghan Study Group, a congressionally mandated report that submitted its findings to lawmakers last month, concluded that maintaining around 4,500 troops in Afghanistan could be enough “to secure US interests under current conditions and at an acceptable level of risk.”

In addition to the 3,500 Americans, there are roughly 7,000 NATO and allied troops still in Afghanistan who depend on US forces for logistics and force protection.