Iraqi soldiers advance in northern Ramadi, 70 miles west of Baghdad, on Dec. 21, 2015. (AP)

Iraqi forces broke into Ramadi’s city center on Tuesday, pushing closer to its main government buildings in what commanders hope will be a final thrust to recapture the key provincial capital from Islamic State militants.

Security forces erected a temporary bridge over a canal to gain access to downtown Ramadi, about 80 miles west of Baghdad, and launch a morning offensive, military leaders said. By nightfall, the troops were within half a mile of the government compound, they added.

Ramadi, the capital of Anbar province, represents a key battle for Iraqi forces. It is the largest population center they have tried to retake from the Islamic State.

The offensive, backed by U.S. air power, also marks the first major battle for Iraq’s armed forces that has largely excluded pro-government Shiite militias, testing whether the military can go it alone.

“We’ve entered the center,” said Brig. Gen. Hamid al-Fatlawi, commander of the army’s 8th Division. The militants have put up only “simple” resistance, he said.

Intercepted Islamic State communications in recent weeks had shown that the militants were increasingly desperate, with leaders imploring their fighters to stay and resist. The U.S. military estimates that just a few hundred extremists remain in the area.

Maj. Gen. Ismail al-Mahlawi, head of the Anbar Operations Command, said the militants were acknowledging that they had “lost control” and were fleeing to the Islamic State-controlled town of Hit, 30 miles to the northwest. Mahlawi said he expected victory within 48 hours.

But despite progress Tuesday, much of Ramadi’s center remained in the hands of the extremists.

Iraqi commanders have said that they believe they can completely retake the city by the end of the year.

“We are very optimistic that we will achieve victory in the next few days, because we are already in the center,” said Brig. Gen. Yahya Rasoul Abdullah, a spokesman for the military. However, he said large numbers of roadside bombs and snipers have made the course of the battle unpredictable.

Iraqi forces reported gains on several fronts. Special forces soldiers, who have been leading the fight from the southwest, crossed the Warrar canal using the bridge assembled by military engineers. They took control of the Bakir neighborhood, according to Fatlawi.

All of Ramadi’s eight bridges have been destroyed in the fighting. On Monday, Prime Minister Haider al-Abadi thanked the military engineers for erecting the temporary bridge that allowed troops to cross into the city.

In a recent interview, Lt. Gen. Abdul Ghani al-Asadi, head of Iraq’s special forces, said he expected that it would take about 10 days to clear the city after his forces crossed the river.

Police forces also claimed advances on Ramadi’s eastern side Tuesday. Brig. Gen. Ahmed al-Belawi, commander of police forces in the province, said his men reached Ramadi’s notorious Street 60, a flash point for fighting even before the city fell in May.

Meanwhile, the Iraqi military said it has fully secured the Albu Dhiab and Jarayshi neighborhoods north of the city.

The recapture of Ramadi would represent the latest in a string of defeats for the militants and provide a much-needed boost for Iraq’s military.

However, Iraqi forces have been heavily reliant on U.S.-led airstrikes as they slowly reclaim territory from the militants. Many Iraqi commanders blamed a lack of U.S. air support for the city’s fall, after a multi-pronged car-bomb attack prompted a demoralizing retreat of troops who had withstood Islamic State attacks for a year and a half.

But the pace of the airstrikes has intensified in recent months. Soldiers said the capture earlier this month of the Anbar Operations Command, a military base in the city’s north, was largely because of the aerial bombardment.

Similarly, the battle for Sinjar, the mountainside town retaken by Kurdish forces last month, was preceded by heavy aerial bombing. Sinjar, once home to members of the Yazidi sect who have suffered some of the Islamic State’s worst atrocities, was left largely flattened.

In Ramadi, the presence of civilians has complicated air support, although there are varied estimates of how many remain in the city. Earlier this month, some commanders put the number of civilians at 10,000, while others said there were just 150 families.

“The international coalition played a major role today in protecting Iraqi forces,” Mahlawi said. They fended off car bombs and suicide attacks, he said.

Fatlawi said Iraqi forces have yet to find any civilians in the neighborhoods they have entered.

“All the areas were empty,” he said. Iraqi military jets dropped leaflets in Ramadi last week urging civilians to leave within 72 hours. But there were concerns about whether that was possible as Islamic State fighters attempted to use families as human shields.

Morris reported from Beirut.

Read more:

Petraeus: The Islamic State isn’t our biggest problem in Iraq

In Sinjar, the Islamic State ‘took everything the Yazidis had and left’

Iraqi Sunnis flee Anbar only to find new dangers in Baghdad

The Islamic State’s atrocities