The graffiti that appeared on a wall near the mosque in Mosul where the Isis (Islamic State) leader declared his caliphate two years ago was a small but symbolic act of rebellion.
The spray-painted letter "m" - for the Arabic word "mukawama," meaning resistance - was part of a campaign by Kitaeb al-Mosul, an underground opposition group in the northern Iraqi city that released a video detailing their efforts this month.
Isis reacted with swift brutality, executing three young men it accused of being involved. The militants released their own video showing the men kneeling in orange jumpsuits before being shot in the head. The letter "m" was sprayed on the wall behind them, a reference to their alleged crime. A spray can lay on the ground beside them, surrounded by blood.
In recent months, Isis has carried out more arrests and executions such as these in a sign of desperation as it faces the prospect of losing Mosul, according to reports from inside the city.
Mosul is the largest city under Isis control and is central to its narrative of having restored the Islamic caliphate. It was less than a month after Mosul fell in June 2014 that Abu Bakr al-Baghdadi appeared in the mosque there and called on Muslims to follow him.
The recapture of the city would be a significant step toward depriving Isis of its territory and forcing the group back into an insurgency, US and Iraqi officials say. That is only a matter of time, they add.
Prime Minister Haider al-Abadi has pledged to retake Mosul by the end of the year, and the Iraqi Air Force dropped 7 million leaflets on the city last week telling residents to prepare for the "zero hour".
As Iraqi forces - and the US troops advising them - move closer, making the recently recaptured Qayyarah Air Base, 40km south of Mosul, a logistical hub for the impending battle, Isis has also been making preparations.
"Daesh is weaker in Mosul, but it is using methods of oppression like random arrests to try and show it is still in control," said a representative of Kitaeb al-Mosul. He spoke on the condition of anonymity for security reasons. He described the atmosphere in the city as "tense" and said the militants were in a state of "confusion".
Isis began carrying out mass arrests after the group began its graffiti campaign two months ago, he said.
The militants have constructed new berms around neighbourhoods on the north, east and south sides of the city, he said. In some neighbourhoods, concrete barricades have been erected, he said, speculating that the militants are trying to isolate neighbourhoods because they are concerned that residents may turn against them if Iraqi forces draw near.
"Right now they are making arrests with no investigation, in a way they didn't before," said Sheikh Mohammed al-Jarba, a tribal leader from the city, who said he is regularly in touch with people there.
"I know they are digging new trenches around the city. They've never stopped digging them."
Internet connections to homes in Mosul have been banned over the past two months, as Isis attempts to prevent information on its positions from leaking out. Cell networks have been largely cut for more than a year and a half.
However, some patches of phone network remain, and those with relatives in Mosul occasionally receive updates from their loved ones, allowing some glimpses of life in the city.
There are no accurate estimates of the number of civilians that remain in the city, but the United Nations has said more than a million people could flee Mosul and its surroundings during the offensive. Some Iraqi officials and relatives of residents say that figure could be even higher because thousands of people have arrived in Mosul after offensives in other Islamic State areas.
They are paranoid, and the number of searches is way more than before
One former Mosul resident said Isis has been seizing empty homes to house those displaced, including the house of her grandmother who had left the city.
"The number of people has increased a lot," she said, adding that her friends and relatives had said there had been "searching campaigns" on houses.
"They are paranoid, and the number of searches is way more than before," said the woman, who now lives in the Iraqi city of Dahuk and whose name has been withheld for safety reasons.
In the same Islamic State video that shows the execution of the alleged spray-painters, the group also executed three men it accused of spying.
"Send your agents and spies; our swords are ready for them and are thirsty for their blood," a militant said, accusing the men of being "the eyes of America".
The US military estimates that around 3000 to 4500 militants remain in Mosul.