ERBIL, Iraq -- Iraqi military officials say they are closing in on the last remaining neighborhoods under ISIS control in the nation's second-largest city of Mosul, but as they prepare to mount a final assault on the Old City, they face their toughest battle yet in the seven-month offensive to liberate the city.

We joined the Iraqi federal police on the front lines in that fight, in the tight, congested neighborhoods bordering the Old City, and we were shown a hint of what is to come.

It is a warren of narrow streets and blind alleyways. Soldiers, now engaged in guerrilla warfare, are changing tactics on the fly.

Get Breaking News Delivered to Your Inbox

They had strung up blankets and bedsheets across the alleyways so they could duck beneath them in order to stay out of an ISIS sniper's line of sight.

One soldier was using an ordinary household mirror in order to peek around corners to make sure ISIS gunmen weren't sneaking up to attack.

We followed troops up four flights of stairs, ordered to stay low as we passed blown-out windows, in order to avoid catching the eye of waiting ISIS gunmen.

In a darkened bedroom on the top floor we found an Iraqi soldier manning a .50-caliber heavy machine gun.

He showed us the target, just a few blocks away: an ISIS sniper position that was providing cover for advancing ISIS militants in the streets below.

It was a little more than a hole in a wall in a bombed-out building.

Once the gunman got the fix on the target, he opened fire. The heavy machine gun roared, shaking the building, as round after round slammed into the suspected sniper's nest.

With considerable help from U.S. airstrikes, Iraqi special forces have made significant gains in the past week -- to the point where ISIS is surrounded on three sides with the Tigris River running along the fourth.

There is no escape.

But airstrikes, artillery and even armored personnel carriers become obsolete in the congested neighborhoods of the Old City, where hundreds of ISIS fighters are hiding among the estimated 200,000 civilians still trapped inside.

They've knocked holes through walls in order to pass from house to house. They've even ordered residents to remove their front doors so ISIS fighters can take cover and use them as fighting positions unhindered.

It is a battle that can only be fought on foot.

Lt. Col. Hussain Sghaeer, a federal police battalion commander, said plans are underway to liberate these last remaining neighborhoods.

But it is a stronghold within a stronghold, and home to the Old City's Nuri mosque, from where ISIS leader Abu Bakr al Baghdadi first proclaimed the creation of the so-called caliphate.

Recapturing that mosque is seen as a symbolic victory that would effectively signal the end of ISIS in Mosul.

Iraqi generals and political leaders alike had vowed to defeat ISIS by the start of the Muslim holy week of Ramadan.

But with Ramadan now just days away, that looks unlikely.

ISIS is certain to make a last stand, and it's expected that the fighters who remain in the Old City will defend it to the death.