RAMADI, Iraq — This once-teeming capital of Iraq’s Anbar province is now little more than a field of debris.

Iraqi troops last month pushed Islamic State fighters out of the city that the extremists had held for seven months and declared Ramadi liberated. It was an important victory for the Iraqi forces. But the scale of the destruction in Ramadi has many here worried about when and if the city will be rebuilt.

Fighting to uproot the Islamic militants and the nearly 800 airstrikes in or near Ramadi by a a U.S.-led coalition have damaged nearly every structure in the city. Homes, schools, factories and mosques have been flattened or blown apart.

What happens next in Ramadi, once home to a population of more than 400,000, will be a test of whether Iraq can remain a united country and whether heavily Sunni areas can exist peacefully in a Shiite-majority country. Many of Iraq’s Sunnis distrust the Shiite-led government and feel neglected by the state.

Ramadi’s reconstruction is likely to cost billions of dollars, Iraqi officials say, at a time when the revenue of the national government has plummeted because of falling oil prices. Meanwhile, plans to secure the city with thousands of Sunni tribal fighters have stalled.

The early disputes over security could threaten the city’s recovery, keeping residents from returning as homes are rebuilt. The security problems also could revive old tensions between Shiite and Sunni leaders here.

“Ramadi is totally destroyed, there are no forces to secure the city, and there is no trust between the government and the people,” said Raed al-Dahlaki, a Sunni lawmaker and chairman of Iraq’s parliamentary committee on displaced persons.

“Ramadi is the center of the Sunni community in Iraq,” he said. “If the government is slow or unable to rebuild, then there is no future for Sunnis in this country.”

“It was a costly victory,” said Brig. Gen. Ali Jamil, a member of the elite counterterrorism unit that has led the battle in Ramadi.

When asked about the thousands of Sunni fighters that U.S. and Iraqi officials said would immediately deploy to secure liberated neighborhoods, Jamil scoffed.

“It’s only us here now. There are no tribal fighters whatsoever,” he said. “They said they would deploy when they got their weapons, but they haven’t. We don’t believe them. Their leaders just want to make money from the government.”

“These delays are essentially all attributable to the near-total absence of any meaningful process of . . . reconciliation between Sunni and Shiite leaders,” Kenneth M. Pollack, a former CIA intelligence analyst and now a Middle East expert at the Brookings Institution, wrote after Ramadi’s liberation last month.

In the years before the Islamic State takeover, Sunni leaders accused the Shiite-led government and security forces of sectarian repression in their communities. Tribal sheiks such as Rafi al-Fahdawi, one of the leaders of Anbar’s Albu Fahd tribe, worry that tensions will resurface if efforts to rebuild are postponed.

“We need something like the Marshall Plan to rebuild Ramadi. It will take years,” Fahdawi said, referring to the mammoth U.S. initiative to aid Western Europe after World War II. “But we don’t believe the government will help us. When it comes to the government, the people of Anbar have anger in their hearts.”