Tim Arango entered the city of Mosul, Iraq, with Iraqi special forces soldiers.
All along the muddy streets of eastern Mosul on Wednesday, men with bushy beards stepped from the gates of their driveways, looking as if they had woken from a bad dream.
The men, some dressed in ankle-length Arab gowns in the jihadist-regulation style, smiled and waved at the passing soldiers, and boys flashed the two-finger victory sign and yelled, “Heroes!” Others held white flags.
Some were smoking and others had cigarettes tucked behind their ears — celebrating the Iraqi forces’ victory over the Islamic State in their neighborhood by savoring some of the small freedoms that had been banned under more than two years of militant rule.
“We are very, very happy,” said one man, Qais Hassan, 46, surrounded by soldiers. “Now we have our freedom.” The Islamic State, he said, “asked us to implement religion. But they had nothing to do with religion.”
The victory by Iraqi counterterrorism forces in this eastern neighborhood of Mosul was a promising moment. But most expect that there will be long and intense fighting ahead before the entire sprawling city is reclaimed.
On Wednesday, which began rainy and cloudy — difficult weather for the American warplanes overhead — but later turned sunny, the fighting went quiet, but for sporadic shooting off in the distance.
The Iraqi special forces in the area of eastern Mosul, who allowed a group of New York Times journalists to travel with them, were going door-to-door looking for weapons, booby traps and Islamic State fighters. At the same time, they were trying to keep order as entire families, with backpacks and suitcases in tow, streamed in from neighborhoods still controlled by the Islamic State, also known as ISISor ISIL.
The men were mostly fixated on three things: the big beards they had been forced to keep, the cigarettes they had been barred from smoking, and the cellphones they had been forbidden to use.
“They would have killed me if they saw this,” said Farras Sharif, 55, holding up a cellphone. “Just one bullet.”
A man who still had his beard said his razor was electric, so shaving would have to wait until electricity was restored. A newly clean-shaven man, Saad Qhais, held his hands about three inches from his chin and said, “My beard was to here. I was really dirty.”
Most of the women from the neighborhood stayed indoors, but there were many among those displaced from other neighborhoods, in niqabs and veils, some carrying white flags and bags of clothing.
Parents said they were hopeful that their children, out of school for two years, could return to classrooms. One father, Mohammed Mahmoud, 33, said he was grateful that he no longer had to worry that his young daughter would be forced into marriage with an Islamic State fighter.
“What worried me the most was my daughter,” Mr. Mahmoud said. “Because they have no religion. I consider me and my family born again today.”
For for the first time since 2014, Iraqi soldiers were seeing firsthand what life in Mosul had been like under Islamic State rule. But they were also catching a glimpse of some of the challenges ahead, simultaneously pressing the fight toward the city center and going about the messy business of re-establishing government authority.
Whether the mostly Shiite Iraqi military and police forces can keep the peace behind their front lines will largely depend on whether they can care for the displaced and root out Islamic State fighters without exacting collective punishment on a Sunni Arab population that largely welcomed the Islamic State fighters at first. Any lasting stability will rest as much on those points as on the military successes leading up to them.
Although there were plenty of outward signs that the civilian population of Mosul was welcoming the soldiers as liberators, that was not the only story. Military commanders and residents acknowledge that there is still a degree of support within Mosul for the Islamic State, and that thousands of fighters are digging in to defend the heart of the city.
In the newly secured neighborhood on Wednesday, the counterterrorism troops, Iraq’s most professional fighting force, seemed to be taking care to not alienate civilians. But this is not the only battle that will be fought, and fears have run high that spasms of revenge violence will tear through liberated areas. (An Amnesty International report issued on Wednesday alleged that a tribal militia taking part in the offensive had tortured detainees in liberated villages near Mosul.)
But Mr. Hassan, speaking for himself and many of his neighbors, said that, more than anything, they want to feel like Iraqis again.
“The love of the country is greater than the love of the religion,” he said. “Now we understand that.”
Mr. Sharif, his friend, agreed. “Now, yes, we are with the Iraqi Army, with the law, with Iraq,” he said.
At least for one day, the atmosphere was a mix of jubilation, as civilians welcomed the soldiers with handshakes and hugs, and tension, as soldiers tried to determine who among the crowds of bearded men was an Islamic State fighter and who was an ordinary civilian.
Soldiers were trying to collect the men in groups, demanding to see their government identification cards, if they had them, so they could check them against a list of Islamic State members that had been compiled from informants. Later, a colonel asked all of them to go home and shave their beards and then gather at sunset with their ID cards in hand.
In some cases, civilians were helping the soldiers by pointing out neighbors they said had joined or supported the Islamic State.
An Iraqi colonel said that one resident had led to the capture of a local Islamic State leader, who had injured his leg when he fell off a motorcycle. The suspect, who looked to be in his 40s or 50s, could be seen handcuffed and hobbling before he was pushed into the back of a white pickup truck. A red-and-white kaffiyeh scarf was tied around his face, and he was driven off.
A man identified as that local leader’s son was also handcuffed and placed in the back of a different truck. But local residents then said the son had nothing to do with the father and had not been an active member of the Islamic State, and he was let go. When he hesitated, a soldier threatened that he would start shooting after a count to four, and then shoved him in the back. The man ran off, and disappeared down an alley.
With the Iraqi forces now inside the city, the focus will soon turn to the question of whether the politicians, after the battle, can bring together the communities of Mosul — Sunnis, Shiites, Christians, Yazidis and others — and reunite the country. In Iraq’s long history of wars, the political aftermath has usually led to something worse.
“I think the politicians have learned a lesson with Mosul,” Brig. Gen. Abdul-Wahab al-Saadi, a special forces commander, said in an interview on Wednesday. “They have to do their job.”