BAGHDAD – Former Sunni insurgents are signing up to fight al-Qaida, Shiite militias have toned down attacks, commerce is reviving and monthly casualty counts are falling.

But the failure of Iraq’s leaders to strike power-sharing deals raises questions whether the progress can survive after America begins sending its troops home next year.

Nearly a year after the U.S. gambled by pouring troops into Iraq’s capital, there is finally cause for hope that the worst of the Iraq war may have passed, even if the endgame takes longer than Americans and Iraqis want.

But the political rivalries between Sunnis and Shiites that fueled the conflict remain unresolved. And time may be running out for America to midwife a solution.

By July, the United States expects to withdraw all five combat brigades that were rushed to Iraq this year by President Bush to quell a tide of Sunni-Shiite slaughter that threatened to tear apart the country.

Also by mid-2008, U.S. and Iraqi officials hope to finish negotiations on a new deal that will shift more power to the Iraqis and probably reduce Washington’s ability to influence decisions by Iraq’s sectarian-minded leaders.

Nevertheless, the security turnaround over the past three months has been startling.

In November 2006, at least 2,250 Iraqis – civilians, soldiers and police – were killed in political violence. Last month, the death toll was 718.

American deaths are down too, plunging from 126 in May to fewer than 40 for both October and November – even though 2007 is the deadliest year of the war for U.S. forces.

Thousands of Iraqis who fled the country are now returning. Areas of Baghdad that were ghost towns only a few months ago are reviving. Shoppers stroll the streets with their children – even after dark.

“I think next year will be better because the situation is improving every day,” said Firas Adel, a Shiite clothing merchant. “More people are returning to their homes and businesses. There is a sense of safety and stability, and this will boost the economy.”

Defense Secretary Robert Gates, in an early December stop in Iraq, was even able to project a sense of optimism that would have seemed ludicrous at the beginning of the year. “I believe that a secure, stable Iraq is within reach,” Gates said.

But he added: “We need to be patient.”

The relative calm in Baghdad, Anbar and other battlefronts is fragile; fighting still rages in key areas not far from the capital. Bombs explode nearly every day in Baghdad, but draw little attention unless they cause multiple casualties.

Furthermore, Shiite and Sunni extremists groups, including al-Qaida in Iraq, have been battered but not destroyed. Al-Qaida fighters forced out of Baghdad are trying to regroup in northern Iraq and in the Euphrates Valley near Haditha to the west.

Other armed groups are believed laying low, waiting for the U.S. drawdown to return to the streets.

“There are good stories to tell here in terms of returning Iraqis. There are economic developments that are occurring that need to be reported. But I would do it at a measured pace,” U.S. military spokesman Rear Adm. Gregory Smith counseled journalists recently.

Much of the success is due to President Bush’s decision to send nearly 30,000 American reinforcements to Iraq and to changes in tactics by top U.S. commander Gen. David Petraeus.

With the added firepower, U.S. forces drove Sunni militants, including al-Qaida in Iraq, away from their strongholds in Sunni-dominated areas in and around Baghdad. U.S. and Iraqi forces are pressuring extremists in northern and western Iraq to prevent them from regrouping.

The buildup encouraged Sunni tribal leaders to accelerate their revolt against al-Qaida, which began even before the troop surge. Now thousands of Sunnis are signing up to join U.S.-backed defense groups to make sure the extremists cannot return.

On the Shiite side, growing public discontent over criminality and abuses within the ranks of the biggest Shiite militia prompted its leader, anti-U.S. cleric Muqtada al-Sadr, to suspend attacks and purge his Mahdi Army.

U.S. officials also say there are signs Iran has slowed or even stopped delivering weapons to Shiite militants, including those who ignored al-Sadr’s orders.

“I think the new year will bring better life for Iraqis,” said Ali Muhsin, 26, an Education Ministry employee. “If the pressure on al-Qaida and the other terrorist groups will continue, then I expect better days for Iraqis in the near future.”

But U.S. officials have long insisted that there can be no purely military solution to the Iraq conflict without lasting political agreements among Shiites, Sunnis and Kurds.

With little sign of political progress, Washington is increasingly frustrated, fearing that gains achieved at the price of U.S. and Iraqi lives will be squandered by politicians unable to set aside sectarian bitterness and hatred.

“The security surge has delivered significant results,” U.S. Deputy Secretary of State John Negroponte said recently. “Now progress on political reconciliation, including key national legislation as well as economic advances, is needed to consolidate the gains made thus far.”

Otherwise, he warned “we risk falling back to the more violent patterns of the past.”

Prospects for agreements on a range of issues – including sharing the oil wealth and relaxing the ban on supporters of ex-President Saddam Hussein in government jobs – are clouded.

Outside Baghdad, the central government barely functions. Millions of Iraqis are still clamoring for reliable electricity, clean water and other services they hoped for when Saddam’s regime collapsed nearly five years ago.

Profound divisions remain over the vision for the new Iraq – either a strong central government or self-rule by ethnic and sectarian regions.

“The principal problem is this is a country with no agreement on what the country is,” said Mideast analyst Jon Alterman. “You have lawlessness, thuggery and organized crime.”

Sectarian wounds inflicted by Saddam’s Sunni-dominated regime against Shiites and Kurds – and ripped open in the recent wave of sectarian slaughter – are far from healed.

“The distrust, the fear, the resentment on the part of the people who are in (Iraq’s) government is profound,” Phebe Marr, a leading Iraq scholar, told Foreignpolicy.com.

“You only have to sit in a room and listen to these people talk to understand how deep the distrust is.”

American soldiers encounter signs of this every day.

Sunni ex-insurgents are often more willing to deal with Americans than the Shiite-dominated security forces. Shiite police and army officers openly complain the Americans are dealing with Sunnis who have Shiite blood on their hands.

With such broad differences, many U.S. diplomats, military commanders and private analysts doubt the Iraqis will reconcile through grand, sweeping agreements or landmark legislation at the national level.

Instead, they believe the best shot is a patchwork of local peace deals between Sunni and Shiite tribes which, over time, will produce reconciliation from the bottom up. That process could take years.

“You will see some levels of reconciliation in some places, but it’s going to be hard to strike a grand agreement that means all sectarian problems are put behind us,” Alterman said.