Graphic videos of men in Iraqi security force uniforms carrying out beatings and summary executions on the streets of Mosul have cast a shadow over the campaign to retake the city from Islamic State as prime minister announced the launch of military operations.

“We announce the start of a new phase in the operation, we are coming Nineveh to liberate the western side of Mosul,” said Haider al-Abadi in a brief televised speech.

The violent scenes, posted on social media pages supporting the Iraqi government forces, are reminiscent of Isis’s own propaganda and starkly contrast with the overwhelmingly positive impression left so far by the US-trained troops leading the battle to retake Iraq’s second city.

The videos have been condemned by the UN and human rights groups, and raise concerns about the next stage of the campaign, when troops will move into the western side of Mosul, and the Iraqi government’s ability to bring long-term stability to the city.

Security forces have been welcomed by residents weary of Isis’s brutal rule, and praised for their restraint through months of gruelling urban warfare, defying fears that the assault by Shia-dominated forces on a Sunni-majority city could spark a sectarian bloodbath.

But underlying tensions have not vanished. The population remains wary of Baghdad and the Shia militias that bolster its power, and with the second major part of the campaign for Mosul expected to start within days, abuse could feed dangerous resentment.

In one of the bloodiest films, a man behind the camera urges on a group in Iraqi federal police uniforms as he films them clubbing four men in civilian clothes. “Well done – you did a good job,” he says, before the attackers drag the men down an asphalt road, and summarily execute three with machine guns.

Facebook Twitter Pinterest Another of the images appears to show the men in police uniforms with whips. Photograph: Facebook

In other videos circulated on Facebook young men are beaten, or forced to imitate animals – one a dog, another made to bleat like a goat.

The men abusing the prisoners appear to wear the insignia of various security forces including federal police, the regular army, the Counter Terrorism Service (CTS) and militias known as the Popular Mobilisation Forces.

Several of these groups are trained and armed by the US-led coalition in a programme that is meant to cover international laws of war, including treatment of prisoners. The UN’s commissioner for human rights described the footage as “deeply disturbing” and called on the Iraqi government to investigate.

And while all the videos claim to show abuse of Isis fighters, a lack of safeguards means civilians are likely to be at risk. In the race to disrupt sleeper cells and round up collaborators, security forces have already cast such a wide net that their targets included at least one Shia family who lived in hiding under Isis.

The prime minister’s office has launched an investigation into the videos as “a precaution”, although it insisted it considers them a fabricated slur. “If it is proven that there were abuses, the perpetrators will be handed over to the courts. In other operations there were individuals who committed abuses and … some were sentenced,” spokesman Saad al-Hadithi said.

Most of the videos and pictures were posted on the internet after the second phase of the Mosul operation started in late December. They stand in stark contrast to matching posts on the official special forces Facebook page, which shows them posing for selfies with newly liberated residents, handing out food and water, and even feeding animals. But though they show abuse, the images appear to have been posted by government supporters rather than whistleblowers, garnering thousands of likes and shares. The Facebook pages they appear on unofficially document the progress of the campaign.

One of the most popular posts, liked nearly 9,000 times, is drafted like an ad-hoc poll about summary execution. Below a photo of a young captive, blindfolded on the floor while two police officers place their feet on his head, a caption asks what readers think the officers should do with him.

“Swear on Qur’an, these young men sent us this photo from Mosul and arrested this Daesh [fighter] with their own hands. They say if you like and comment, they would flatten him in this place now, no arrest, no court and nothing else … it is up to you,” it reads.

There were around 1,200 comments, most of them calling for the prisoner’s blood. “Oh heroes! Put a bullet to his head, finish him off. Don’t imprison him. Don’t spend anything on him. An eye for an eye and a tooth for a tooth, they were the ones who committed crimes first,” said one user with the name Warda al-Sabah. There was no update on what had happened to the man.

The videos threaten not only to tarnish the image of security forces, but potentially to undermine public support for the Mosul offensive, human rights activists said, calling on the government to investigate thoroughly.

“While this operation has seen so few incidents of abuse compared with earlier operations, it is vital that prime minister Haider al-Abadi takes them seriously when they do come up,” said Belkis Wille, who has documented human rights abuses in Iraq for Human Rights Watch. “We often see the authorities creating investigative committees – we rarely see results. Let’s hope it is different this time.”

It is difficult to identify the men and young boys in the images because after two and a half years surviving Isis terror, people in the city do not want to be seen as critical of the security forces for fear of being labelled as Isis sympathisers. As the videos show, it can be deadly.

In another video dated 22 January a terrified young boy identified as a suicide attacker is led on his knees and the palms of his hands by an officer of the interior ministry’s US-trained Quick Reaction Force.

He is forced to bark like a dog, repeat “I am a dog, son of a dog”, then bite the boot of soldier, as an officer commands him to show his face so his humiliation is public. “Raise your head so your face is visible,” the man says.

Almost all the comments on the video praise the soldiers for humiliating the young fighter, although there is one lone voice of dissent, warning that the attackers risked sinking to the level of the group they are trying to destroy.

“Even if he is Daesh, he is still a human, brothers please do not violate the reputation of the army and the police, we do not want to behave like Daesh,” wrote a commentator with the name Arkan Alazy, who said he had lost a brother to the group.

“My brother was in the army and was killed by Daesh but this does not mean that I would become a criminal like them,” he wrote. “Prisoners are treated differently, that is what our religion teaches us.”