A heart-rending picture of a four-year-old Syrian boy apparently alone in the desert, separated from his family and clutching a tattered plastic bag of possessions, seemed to epitomise the refugee crisis caused by the civil war.

The image went viral after it was tweeted by United Nations staff who helped the child find his family, with the caption: "Here 4 year old Marwan, who was temporarily separated from his family …", and then retweeted to a wider audience by a CNN International anchor with the caption "UN staff found 4 year-old Marwan crossing desert alone after being separated from family fleeing #Syria".

But it was not quite what it seemed at first glance. A second photograph, posted by UN staff on Tuesday, showed that the boy was straggling behind a larger group of refugees. "He is separated – he is not alone," Andrew Harper, head of the refugee agency UNHCR in Jordan, who took the first picture, clarified. Marwan had been reunited with his mother within 10 minutes.

The picture triggered a wave of sympathy on social media, swiftly followed by scepticism and anger at the perceived misrepresentation of Marwan's plight. But it also threw a spotlight on the number of child refugees, both accompanied and alone, who have been forced from their homes in Syria over the past three years.

This second image shows that the boy was straggling behind a larger group of refugees. Photograph: Jared Kohler/UNHCR/Twitter

Marwan – a name given to the boy by UNHCR to protect his identity – was photographed close to the Hagallat border crossing between Syria and Jordan. Head cast slightly down, the four-year-old is seen trudging through the desert sand dragging a large plastic bag.

He is dressed warmly in trousers, jumper and jacket in a region where winter temperatures plummet fast as the sun sinks. A female aid worker is bent sympathetically towards the small boy, perhaps asking him where his mother is; two male UNHCR workers are approaching Marwan, and a third, carrying a large bag on his shoulder, is also in the frame.

The second photograph, taken by the UNHCR's Jared Kohler, showed several dozen refugees, possibly one extended family. One group is ahead, a few straggle behind, among them Marwan and other children.

A UNHCR press officer who was at the border as Marwan crossed into Jordan said it was wrong to describe the child as alone as his family were 20 steps ahead of him.

"Let me say first, the child was temporarily separated. He was a tiny bit behind his family. His family were ahead and he was just straggling behind. That's the story. He didn't enter as an unaccompanied minor … he was literally 20 steps behind," she told the Guardian.

"What's incredible is that these families have come quite a massive distance through Syria to reach safety in very dangerous circumstances. [This] family had walked for quite a bit carrying their belongings; a large group. They walked part of the way through the desert, which you see in the background and this child, of course tired from the walking, and you see him carrying his little bag, he was a little bit behind his family.

"And of course everyone has connected with this idea that, you know that it is a lad on his own, but really this is about a children's crisis and innocent children are being continuously affected … we see this every day."

According to the UN, more than a million children have fled their homes because of the war in Syria, mostly ending up in vast refugee camps in neighbouring Jordan, Turkey, Lebanon and Iraq. Many more are displaced within Syria itself.

Most children are within large family groups, but some – usually teenagers – have crossed borders unaccompanied by any adults. Many are traumatised by witnessing death and destruction, some are injured, ill or malnourished, and many have not attended school for months or years.

Unicef, the UN's agency for children, estimates that "more than five million are threatened by the brutal conflict, soon entering its fourth year".