A sign put up by Islamic State militants in a square in Raqqa, Syria, reads, “And then there will be the Caliphate upon the Prophetic method.” The frame used to display a portrait of Syrian President Bashar al-Assad before the government lost control of the city in 2013. (Alice Martins/For The Washington Post)

The Islamic State may still have in excess of 30,000 fighters in Syria and Iraq and appears to have rebounded from some of its worst setbacks, according to two new reports that call into question whether the militants are as close to defeat as the U.S. military has suggested.

The figures, contained in reports by the U.S. government and the United Nations, are far higher than previous estimates of Islamic State strength following its major defeats last year, when the militants were driven out of their territory in Iraq and most of their key strongholds in Syria. The U.S. military has not released any figures since last year, but comments by military officials had indicated there were not many more than 10,000 fighters left.

U.S. military officials disputed the new assessments but declined to give alternative numbers, saying it is against military policy. The figures “seemed high,” said Col. Sean Ryan, the U.S. military spokesman in Baghdad, but he added that “with all the variables, there is really no way to know.”

“As far as we are concerned, ISIS remains a threat as long as they have the capability to launch terror attacks anywhere, and we will pursue them until they are completely defeated,” he said.

The U.S. government report attributed its numbers to the Defense Department but acknowledged that such estimates “have varied sharply among sources and over time.” The report was delivered to Congress by the Lead Inspector General, an office created in 2013 to oversee the U.S. military’s operations overseas against the Islamic State. Quoting Defense Department officials, the report put the number of fighters in Iraq at between 15,500 and 17,100 and in Syria at 14,000.

The second report was written by the U.N. Analytical Support and Sanctions Monitoring Team, which monitors the impact of U.N. sanctions, and offered a similar figure. Quoting unnamed member states, it said there are believed to be between 20,000 and 30,000 Islamic State fighters across Iraq and Syria, divided roughly equally between the two countries. Some of them are active on the battlefield, while others are hiding out in communities or remote areas, it said. The figure includes “a significant component” of foreign fighters.

At its peak, the Islamic State is thought to have mustered an army of about 100,000 men, spread across the vast area spanning Syria and Iraq that once composed its self-proclaimed caliphate. They included as many as 30,000 foreign fighters from all over the world, a small number of whom have escaped and made their way back home.

Both new reports note, however, that although the Islamic State is close to total territorial defeat, it remains a potent threat to the stability of Iraq and Syria. Taken together, the reports suggest that the military campaign still has a long way to go before the Islamic State can be said to have been vanquished, despite President Trump’s assertion last month that the battle against the group was “98 percent” finished.

In Syria, the Islamic State has “rallied,” the U.N. report said, attributing this to a two-month pause in operations after the United States’ mostly Kurdish allies stopped confronting the militants in order to send fighters to battle the Turkish incursion into the northern Syrian district of Afrin.

This pause “prolonged access by ISIL and gave it a breathing space to prepare for the next phase of its evolution into a global covert network,” the U.N. report said, using another name for the group.

The Islamic State’s bureaucracy remains essentially intact, the U.N. report continued, although the group has lost most of its territory, many of its senior leaders have been killed and its structures have been disrupted. Its leader, Abu Bakr al-Baghdadi, remains in overall control, but he has been obliged to delegate authority across a wide area.

“The collective discipline of ISIL is intact,” the report said. “The general security and finance bureaus of ISIL are intact. The group’s immigration and logistics coordination office is also intact, although it is having difficulty communicating and its chief has been killed.”

In another sign that the group continues to function, the Islamic State’s news agency Amaq remains in operation in eastern Syria. Although its output dipped last September and October, it has now stabilized at a higher level, the report said.

In Iraq, the U.S. government report noted that although the group no longer controls territory, fighters organized in small cells continue to plant bombs and conduct kidnappings. It cited a recent uptick in attacks attributed to the Islamic State in the provinces of Kirkuk, Diyala and Salahuddin as a sign of its “resilience” as it seeks to reinvent itself as an underground insurgent force.

The U.S. government report said an estimated 4,000 to 6,000 of the 14,000 Islamic State fighters in Syria are in a pocket of territory bordering areas held by the U.S. military and its allies. Although the report did not specify where the others are, it is likely that they are in a larger area that is surrounded by Syrian government forces and their allies.

Commenting on the report during a video-linked news conference at the Pentagon, Maj. Gen. Felix Gedney, the British deputy commander for strategy and support with the U.S.-led coalition against the Islamic State, said he believes there are at least 1,000 Islamic State fighters remaining in the pocket of territory. Speaking from Baghdad, he also said the new numbers seem “high” but did not offer an alternative assessment.