BAGHDAD (Reuters) - Islamic State militants fighting to hold on to their Mosul stronghold have killed at least 20 people in the last two days for passing information to "the enemy" and are back on the city streets policing the length of men's beards, residents say.

Five crucified bodies were put on display at a road junction on Tuesday, a clear message to the city's remaining 1.5 million residents that the ultra-hardline Islamists are still in charge, despite losing territory to the east of the city.

Others were seen hanging from electricity poles and traffic signals around the city, residents said on Wednesday.

Thousands of Islamic State fighters have run Mosul, the largest city under their control in Iraq and neighboring Syria, since they conquered large parts of northern Iraq in 2014.

They are now battling a 100,000-strong coalition including Iraqi troops, security forces, Kurdish peshmerga and mainly Shi'ite paramilitary groups, which has almost surrounded the city and has broken into eastern neighborhoods.

Residents contacted by telephone said many parts of the city were calmer than they had been for days, allowing people to venture out to seek food, even in areas which have seen heavy fighting over the last week.

"I went out in my car for the first time since the start of the clashes in the eastern districts," said one Mosul resident. "I saw some of the Hisba elements of Daesh (Islamic State) checking people's beards and clothes and looking for smokers".

Islamic State's Hisba force is a morality police unit which imposes the Sunni jihadists' interpretation of Islamic behavior. It forbids smoking, says women should be veiled and wear gloves, and bans men from Western-style dress including jeans and logos.

Hisba units patrol the city in specially marked vehicles.

"It looks like they want to prove their presence after they disappeared for the last 10 days, especially on the eastern bank," the resident said.

Mosul is divided into two halves by the Tigris river running through its center. The eastern half, where elite Iraqi troops have broken through Islamic State defenses, has a more mixed population than the western, overwhelmingly Sunni Arab side, where Islamic State fighters are believed to be strongest.

CRUCIFIED CORPSES

The militants are putting up a fierce defense after their leader, Abu Bakr al-Baghdadi, told them in a speech last week to remain loyal to their commanders and not to retreat in the "total war" with their enemies.

Iraqi military officials say they have sources inside the city, helping them identify Islamic State positions for targeting by the U.S.-led air coalition supporting the campaign, which is also backed by U.S. troops on the ground.

The gruesome public display of the bodies appeared to be a warning against other potential informers.

"I saw five corpses of young men which had been crucified at a road junction in east Mosul," not far from districts which had seen heavy fighting, said another resident.

"The Daesh people hung the bodies out and said that these were agents passing news to the infidel forces and apostates," he said, referring to the Western allies backing the campaign and the Shi'ite-led government of Prime Minister Haider al-Abadi in Baghdad.

In another sign of a clampdown on contact with the outside world, one retired policeman said Islamic State officials were trying to inspect SIM cards to check on all communications.

"I went to get my pension as usual, but the man at the office refused to give it to me unless I handed over my SIM card," said the 65-year-old man, who gave his name as Abu Ali.

"These are the instructions from Daesh," Abu Ali quoted the man at the office as telling him.

Many residents close to the fighting have said the scale of the clashes has been terrifying, with the sound of gunfire, mortar bombardments and air strikes echoing through the streets.

In the Zuhour district, still controlled by Islamic State on Mosul's eastern bank, witnesses said that cars carrying mortars roamed the streets on Tuesday, but were not seen being fired - unlike in the previous two days.

The relative quiet may reflect a reduction in fighting since Iraq's special forces first broke into eastern Mosul a week ago. They faced fierce resistance and have not sought to make any major advance since then.

One witness said traffic had almost returned to normal in most parts of eastern Mosul and markets were operating, albeit not as busily as before the start of military operations.

(Writing by Dominic Evans; Editing by Gareth Jones)