At the second kneel of the prayers, the attack began

In the early hours of 8 July, 51 Muslim Brotherhood supporters camped outside the Republican Guard club in Cairo were killed by security forces. Egypt's military claimed the protesters had attempted to break into the compound with the aid of armed motorcyclists.

After examining video evidence and speaking to witnesses, medics and protesters, the Guardian finds a different story

At 3.17am on Monday 8 July, Dr Yehia Moussa prepared to kneel outside the Republican Guard club in east Cairo for dawn prayers. For a few more hours, Moussa would remain the official spokesman for the Egyptian health ministry. But he was at the club that day in a personal capacity. Along with about 2,000 Muslim Brotherhood supporters, Moussa had camped outside the gated compound in protest at the removal of President Mohamed Morsi, who they then believed was imprisoned inside.

Like everyone else, Moussa knelt with his back to the barbed-wire fence protecting the entrance to the club. A few feet away were Reda Mohamedi, an education lecturer at al-Azhar University, and beyond him Dr Yasser Taha, an Azhar biochemistry professor. All three were friends from university days, and had shared a tent that night.

Within the hour, Taha would be dead with a bullet in his neck and Mohamedi would be unconscious, a bullet through his thigh. Moussa would have gunshot wounds in both legs and have most of his right index finger missing.

All three were victims of Egypt's bloodiest state-led massacre since the fall of Hosni Mubarak, in which, according to official figures, at least 51 people were killed by security forces and at least 435 injured. Two policemen and one soldier were also killed.

The military has said the assault on the protesters was provoked by a terrorist attack. At about 4am, the army says, 15 armed motorcyclists approached the Republican Guard club's compound. The army said the motorcyclists fired shots, that people attempted to break into the compound, and that the soldiers then had no choice but to defend their property.

But a week-long investigation – including interviews with 31 witnesses, local people and medics, as well as video analysis – found no evidence of the motorcyclist attack and points to a very different narrative, in which the security forces launched a co-ordinated assault on a group of largely peaceful and unarmed civilians.

The army turned down four requests to interview soldiers who were at the scene. A spokesman did provide footage of at least three pro-Morsi supporters using some form of firearm some time after the start of the massacre. But the earliest act of provocation the army has been able to prove – a protester throwing stones – comes at 4.05am, more than half an hour after most witnesses agree the camp came under attack.

3.17am The call to prayers

Many of the Morsi supporters outside the Republican Guard headquarters shortly after 3am on Monday had been camped there since the previous Friday. They had blocked off Salah Salem Street, one of Cairo's main thoroughfares, and set up tents. On the first day of the sit-in, three protesters had been shot dead by state officials. But by 3.17am on Monday, when the imam called the camp to prayer, all was calm. Women and children strolled among the tents. A platoon of soldiers stood idly behind the barbed-wire fence.

A few dozen people manned the barricades pro-Morsi protesters had erected on either side of the sit-in, 300 metres up the road in both directions. Others were still asleep. But most gathered to pray – filling the junction between Salah Salem and Tayaran, the half-mile-long side street that leads all the way to the Rabaa al-Adawiya mosque, the site of an even larger pro-Morsi sit-in.

"It was so quiet," said Dr Mostafa Hassanein, a young medic on overnight duty who walked back to Rabaa from the sit-in at around 3am to catch some sleep. "People were praying. The army was quiet too. Some of them were talking to protesters at the wire."

What happened next is highly disputed. But most witnesses agree an attack on the protest started shortly before 3.30am, as the worshippers knelt for the second and final time.

"At the second kneel of the prayers," said Moussa, in testimony corroborated by many others at the scene, "we could hear noises from the sides of the sit-in. So the imam interrupted his du'a [a religious invocation] and finished the prayers very quickly."

At either end of the demonstration, the watchmen on the barricades began to clang together pieces of metal – an alarm used during the 2011 revolution to warn protesters of an imminent attack.

3.25 am The army on the move

Cairo massacre map. Graphic

Two hundred metres to the west, high up in a penthouse apartment, Seif Gamal woke to the cacophony. An engineer in his 40s who describes himself as unaffiliated to any political movement, Gamal and his family had been unnerved by the protesters' presence. Now he looked outside to see what was causing the alarm.

Advancing eastwards up Salah Salem Street, past the Mostafa mosque, were several armoured police vehicles, followed by armed men. "Many armoured police vehicles were coming with many soldiers," said Gamal, whose name has been changed to avoid reprisals from state security. "They came slowly and stopped 100 metres short of the barricades before starting to shoot a lot of teargas – followed, around two minutes later, by a lot of firearms." Gamal said it was unclear at this stage whether the men were firing live rounds.

Realising what he was witnessing, he fetched a camera and began recording the scene. The time on his watch, he said, was 3.26am. The footage was later uploaded by a friend to YouTube.

When it begins, the air is already thick with police teargas, and protesters can be seen gathering at the western barricade to see what is going on.

On the opposite side of the sit-in, protesters rising from dawn prayers were sprinting to the eastern barricades, near the Sayeda Safiya mosque – where a similar assault was taking place.

"When we finished the prayers, we rushed to the source[s] of the sound, because we thought it was thugs," said Mohamedi. "But when we got there, we found it wasn't thugs but security forces shooting teargas. The teargas was coming from vehicles and soldiers were standing behind the vehicles. Then the soldiers started marching towards us firing."

Gamal had a clear view and is adamant that the attack was unprovoked. "I'm sure of that," he said. "The police shot first. I didn't see any motorbikes, and I didn't hear any gunshots before." He added that sticks were the only weapons he had seen the protesters holding. "It was not a reaction to an attack. There was no attack from the demonstrators. They were praying. The police came slowly and surely towards the demonstrators. It was a plan."

Gamal's account is disputed by two residents who live further down the road. Noha Asaad, cited in US media, said security forces responded with gunfire after protesters guarding the western barricades used birdshot. Her neighbour Mirna el-Helbawy, a journalist who was also interviewed by many western outlets, agreed "it was obvious" those in the sit-in fired first. But it is unclear how either resident would have been able to see how the fighting started.

The medics at the makeshift field hospital half a mile away in Rabaa al-Adawiya said the first corpse arrived there at around 3.45am. Yet Helbawy told the Guardian she may not have looked down from her balcony until as late as 3.46am, by which time – according to her tweet (in Arabic) time-stamped at 3.42am – firing had already started, calling into question whether she would have been able to work out who fired first.

Asaad said she did not look outside before at least 3.55am, while her original witness statement on Facebook said the fighting started at 4.15am.

Ninety seconds into Gamal's video – by his reckoning at around 3.28am – one protester can be seen firing what looks like a single-shot firearm towards security forces. But the sound on the footage shows this is clearly not the first shot.

3.40am Blood on the streets

Taha Hussein Khaled, an English teacher, had travelled down from Kafr el-Sheikh, an industrial city in the north, for the sit-in. When the clanging started, he was one of the first to rush to the western edge of the site, fearing the protesters were under attack from anti-Morsi civilians. But reaching the barricade, Khaled realised the attackers were far more threatening: state security officials firing first teargas and then, he said, live ammunition.

"We stood our ground … [but] eventually the teargas became too much so we started to fall back," he said. "I went through the bushes in the middle of the road to avoid being seen. And that's when I was shot. At 3.40. I was running up Salah Salem Street, planning to turn right up Tayaran Street. Then I was shot through my left thigh."

A few metres behind him, Yehia Mahy Mahfouz, a teacher from Sohag, a small southern city, decided to hold his ground as police and soldiers advanced past the barricade. "As they [security officials] approached, I remained in place," he said. "I wanted to tell them that there were women and children praying. Then a soldier hit me with his gun. I felt dizzy and I fell on the ground. I was beaten on my jaw. Around nine soldiers surrounded me and beat me with sticks."

Egyptian supporters of the Muslim Brotherhood run for cover near the elite Republican Guards club. Photograph: Mahmoud Khaled/AFP/Getty Images

In Gamal's video, one captured pro-Morsi protester can be seen being beaten by security officials.

Back at the centre of the sit-in, outside the club entrance, there was pandemonium. Parents scurried around trying to find their children. Those who had been asleep emerged from their tents to hear Mohamed Wahdan, a senior Muslim Brotherhood member, using the imam's microphone to ask the soldiers to have mercy on a peaceful protest.

Nearby, from about 3.30am, 30 protesters including Moussa formed a human chain along the fence protecting the entrance to the club.

"We wanted to make sure that nobody threw any rocks or bottles to provoke them," he said. "After about two or three minutes, the soldiers in front of the Republican Guard club started to put on their gas masks. Then two central security [riot police] vehicles came out of the Republican Guard building. They [the officers inside] were also wearing gas masks. They started to shoot teargas bombs to the far ends of the site first. And then they started to fire horizontally at human height level. Some people got hit [by the canisters]."

Ten minutes later, once the teargas became too much, many in the human chain sank to their knees. Moussa broke free, and tried to find something to soothe the stinging. On the other side of the junction, he found a bucket of water, which he used to wash his face and eyes. Then he tried to get back across the junction to the wire. But there was too much teargas, so he took refuge instead behind the truck that had acted as a makeshift stage for the imam during dawn prayers.

To his right, coming from the eastern edge of the sit-in, he could see that at least one armoured police vehicle – followed by both police and army officers – had broken the sit-in's defences. Their colleagues approaching from the other end would not be far behind.

"I could hear and see them shooting live rounds," Moussa said. "They were already about 20 metres away."

According to those in the camp, the casualties now came thick and fast.

Mohamed Abdel Hafez – who was hit by a live round in his stomach – said he had been sleeping in his tent only minutes before becoming one of the first casualties. "I was asleep and woke up to the sound of shooting," he said later, in hospital. "I got up and I was shot."

Mohamed Saber el-Sebaei said he had still been holding his prayer mat when he was hit. "I was taking cover with another guy behind some rubble and I felt something hit my head," he said. "I held my prayer mat in my hand and I started to cover my head with it. But I couldn't stop the bleeding because there was so much blood."

Amid the chaos, at least 100 protesters fled into the nearest residential tower block, banging on any door they could find and asking for shelter and vinegar – a homemade remedy for teargas. The residents showed them up to the roof, where the police later arrested them. One 11-year-old was still there in the afternoon.

Moussa was also one of the earliest casualties – hit by police birdshot on his left knee. He could stand the pain, just about, so he stayed by the truck until he was hit again two minutes later – by a live round just above his right knee.

The second injury was too much to bear, so Moussa turned and staggered up Tayaran Street to find cover.

"It was there that I got my third injury. I felt a pain in my fingers. I looked at my hand and two-thirds of my right index finger had been shot off." Other protesters carried him to a nearby car, in which he was driven to the nearby Health Insurance hospital.

Hours later, while being transferred elsewhere, state television employees phoned him – as they often did after serious incidents – for a live interview on the casualty count. Moussa told them that he had been there himself, and that it was a massacre – before being cut off by the channel. Later in the day, he was fired from his job as health ministry spokesman for spreading misinformation.

3.45am The field hospital receives its first body

Up at the makeshift field hospital half a mile away in Rabaa al-Adawiya, Dr Alaa Mohamed Abu Zeid – the medic responsible for recording the number of injuries at the hospital – said casualties started arriving at around 3.45am. Days earlier, doctors had taken over a large room in the mosque compound, set up six beds, and filled several shelves with medicine – expecting to deal with maladies such as flu or heat stroke. They were not prepared for what happened that morning.

"The first case was a shot to the head," said Zeid, a radiologist who also volunteered at field hospitals during the 2011 revolution. "Part of the skull was missing, and the brain matter was seeping out." The man was dead.

A man grieves at a make shift hospital where victims are being brought following clashes between Egyptian police and Muslim Brotherhood supporters. Photograph: Mahmoud Khaled/AFP/Getty Images

Realising something serious was going on, the hospital manager woke all the doctors, and asked them to prepare for an emergency situation. But they could never have been ready for what happened next. There were only six beds, and in a worst-case scenario, doctors had expected to deal with up to 25 cases at any one time.

"But this was a massacre," said Zeid. "We couldn't cope. All the time, we wondered when it would stop. But it didn't." By 4am, Zeid said there were already three dead people at the clinic. Between 3.30am and 7.30am he claimed the hospital had received 12 dead, often driven up Tayaran Street in private cars or motorcycles, and around 450 injured.

"Some people had bullets that came through both the back and the chest – which suggests they ran to one side, where they were shot, and then ran to the other side, where they were shot again," said Zeid.

Dr Mohamed Lotfy, in charge of the clinic's pharmacy, had also volunteered as a medic during the Libyan civil war. "It was the same kind of cases," he said, "as if we were in a war zone." Lotfy felt particularly emotional about it. While at the hospital, his mother, wife, two daughters and son were down at the Republican Guard club. "You can imagine how it feels to be running things over here," he said, "but to have your heart and mind over at the massacre."

By 4.30am, most of the clinic's medicine supplies had begun to run out. Those with minor injuries were being sent to state and private hospitals in the area, where many complained of waiting hours to be treated – or even being turned away by officials frightened of involvement in a highly politicised situation. By 7am, Zeid recalled he had to roll up his trouser legs because there was so much blood on the floor.

"Regardless of how well-equipped a hospital was, no one would have been able to deal with what happened," he said. "We were working and crying at the same time."

Zeid said the most heartbreaking cases included a 10-year-old boy wounded by birdshot. A six-month-old baby was also brought in unconscious from the teargas, Zeid said – before being revived. While no child died during the incidents, these cases dispel the myth that the army and police did not harm women and children. Dr Khaled Abdel Latif, a surgeon working in the field that day, reported treating at least 20 women for teargas asphyxiation, while the Guardian met two others who were shot.

Witness including medics at field hospitals, dispel the myth that the army and police did not harm women and children. Photograph: Mahmud Hams/AFP/Getty Images

At one point, Dr Yasser Taha – Moussa's friend, and a well-known face to many of the doctors – was brought in on a stretcher, a bullet wound in his neck. "We couldn't believe it," said Zeid.

One of the doctors, Samer Abu Zeid – a heart specialist used to seeing blood in trauma situations – collapsed to the floor and cried.

4am Chaos on Salah Salem

Hassanein, the doctor who had returned to Rabaa at 3am to sleep, was woken by the hospital manager at 3.45am. "He said there was an emergency situation, an attack," said Hassanein, who emphasised that, while sympathetic to the pro-Morsi protesters, he was not a member of the Brotherhood.

"I ran there. I took my pack with all my first aid – cotton wool, Betadine disinfectant, stitches, vinegar spray to overcome the effect of the gas bombs – and I arrived there about 4am, 4.10am. As I went down Tayaran Street, I could hear shooting and teargas from outside the Republican Guards, but I couldn't see it. And as I was running, I ran past the wounded being brought the other way … One of the protesters came to me with a shot arm. He was screaming very loudly, and the [bottom of the] arm was attached just by the skin. There was nothing I could do for him."

He added: "I saw women and children running back. Other people were running there to defend the wounded with stones and used teargas canisters, and burning tyres. They wanted to create as much smoke as possible to prevent the snipers from shooting."

In the fray, Mohamedi tried to help more vulnerable protesters make their way back up Tayaran Street towards Rabaa al-Adawiya.

At one point, he ran into an elderly woman who was choking on teargas. "I'm looking for my son, I can't find my son," she told Mohamedi, after he tried to help her. According to Mohamedi, he replied: "We're all your sons: let me help you." But she refused again, saying: "It does not matter if something happens to me – but my son is my life. I need to find my son."

So Mohamedi left her there, and headed up Tayaran Street, where he was shot through the inner part of his right thigh. "I saw the officer who shot me," he said. "He was one of those who came from Sayeda Safiya mosque. He made it to [the bottom of] Tayaran Street, and he shot me from about 30 metres away."

At around the same time, Hassanein was also arriving at the junction of Salah Salem and Tayaran, which by now had mostly been cleared of people. On his way he said he saw at least one unarmed protester shot in the head. "I would say this. At that time, at 4.15am, when I saw that guy shot in the head, there was no protester with arms. Some had sticks and wore helmets, but that was it. I swear those who were shot in the head were not carrying guns."

In among the chaos was Dr Ahnam Abdel Aziz Gharib, an assistant professor of microbiology at Zagazig University. Once the teargas became heavy, the veiled Gharib hurried to and fro, trying to find her 21-year-old son, who has asthma. "As I was running from one tent to another trying to find him, they were shooting at us from different directions. I couldn't find him but everybody decided to take cover on the floor. And while I did that I was shot in the back with birdshot – and I began to cough up blood." Later, x-rays would show she had been hit by 75 pellets. A few are still inside her lungs, Gharib said.

"A young officer in a dark suit, who I believe was a state security officer, walked to me and told me to get up, and I said I couldn't because I was injured. Then he put a rifle in my face and said: 'Get up or I'll kill you," so I got up."

Gharib says she was taken down the road and held – along with several other casualties – next to the same central security vehicle that she believes she was shot from. "On top of one vehicle was a CSF [central security forces, the police's paramilitary wing] officer with the weapon I was shot with. I started to beg them, I said I was a mother, a university mother, let us get to the ambulance. But they did not have any mercy, they said the ambulances could not get there because of all the walls we'd built. They kept us there until the sun was up. The sun was already in the sky by the time they let us go."

Some of those detained were not so lucky. Half a mile on either side of the sit-in stand two mosques – Mostafa to the west, and Sayeda Safiya to the east. That morning, many of the protesters from the sit-in had gathered in both. Nineteen-year-old Islam Lotfy – studying to be a pharmacist like his father, Mohamed, one of the doctors up the road at the field hospital – was at the Mostafa mosque. At around 3.30am, Lotfy was in its bathrooms, washing his face. Suddenly, he heard the gunfire outside. Alarmed, he poked his head round the door to the courtyard outside the mosque. There he said he saw several policemen who ordered him back inside. Shortly afterwards, Lotfy said two rifles were poked through the bathroom windows. Despite, Lotfy said, having done nothing that morning except wash his face, he was about to be arrested.

"Someone came and broke the door," Lotfy continued. "There were four of us inside. He ordered us outside, made us lie down on the ground and tied our hands with plastic strips." Then they were led handcuffed to a police van.

"We had our head down and so I didn't see any shooting, [I could] just hear it," Lotfy said. "Members of central security and police were bashing people's cars on both sides of the street." Lotfy said prosecutors would later attempt to frame the protesters for the police's vandalism.

Inside the vehicle, Lotfy said it was hellish. "[It] was meant for 15 people, but there must have been 50 inside. It was very uncomfortable, people were passing out, and there was damp on the ceiling from people's breathing." Then the vehicle was driven inside the Republican Guard club, where the prisoners remained until 9am.

"We thought that people were beginning to die, so we started banging on the sides," said Lotfy. "Then they let us out, us and the other people from three other cars."

A similar round-up had taken place at the Sayeda Safiya mosque. At the Mostafa mosque, only some of those inside were arrested – before the majority barricaded themselves inside. (Resident Mirna el-Helbawy was later adamant that two protesters climbed the minaret and began to fire on security forces.) But at the mosque, everyone was detained.

"To their surprise, a group of police surrounded the mosque," alleged Khaled Nooruddin, a lawyer who is acting for the detainees. "The police ordered them very disrespectfully to walk out of the mosque in twos and to throw away their phones. They walked out of the mosque as if they were war criminals."

Nooruddin said that like those taken from the Mostafa mosque, the 50-odd arrested protesters were crammed into a van meant for 15. Again, the protesters claimed that policemen vandalised nearby cars, perhaps in an attempt to frame them. Again, they said they were driven inside the Republican Guard club, where they had to bang on the side of the truck to be allowed fresh air. "At one point, they got them out, made them lie on the ground, and then walked on them in their military boots," Nooruddin said of the police. "One of the officers came to one of the prisoners with a picture of Morsi and asked him who it was. When [the protester] said it was President Morsi, [the officer] said: 'He's not a president, he's a sheep.' And then he beat him [the protester] up."

More than 600 people were arrested that Monday. Like many others, Lotfy Islam was interned until Wednesday morning, denied legal representation – and charged with murder, attempted murder and possession of arms. "I've never done anything violent," he said. "I didn't throw any rocks. I was just protesting peacefully."

4.30am A street fight

Some of Lotfy's fellow protesters undoubtedly did throw stones. By 4.30am, an hour after the shootings first began, the action had almost entirely moved from Salah Salem Street to Tayaran Street. Army snipers fired on protesters from the bottom of the road, and from the roofs of nearby military buildings. Hundreds of Islamists, fearing that security forces might attack the larger Rabaa al-Adawiya sit-in, and outraged at their earlier treatment, set about hurling stones back at them. Some built barricades, others set tyres on fire to create smokescreens.

Time-stamped army footage given to the Guardian shows that from 4.59am, pro-Morsi streetfighters included at least three gunmen armed with simple single-shot firearms. At least half a dozen threw petrol bombs at security forces from ground level, while pro-Morsi supporters said that two men launched fireworks at the army, and that three men scaled the roof of one residential tower block to throw more molotov cocktails. Footage also shows protesters throwing basins and toilet bowls off a roof.

But the army was still using excessive force against what was even then a largely unarmed group of protesters.

Military snipers continued picking off unarmed civilians. Footage shot by a journalist – Ahmed Assem, working for a newspaper linked to the Brotherhood – appears to show the moment of his own death at the hands of an army sniper.

Ibrahim Raof, another film-maker unaffiliated to the Brotherhood, said his unarmed brother, standing well back from the frontline, was hit by a sniper bullet that ricocheted off the ground into his stomach. Raof also reported, like several other protesters, that nearby hospitals were unwilling to treat the injured protesters for fear of retribution.

"I carried [my brother] all the way to the [Rabaa] field hospital," said Raof. "In the field hospital we found it was a live bullet." They stitched him up and Raof took him to two other Cairo hospitals, which refused to admit him. Raof added: "So then I had to drive him without any medical instruments all the way to 6 October [a city 10 miles west of Cairo] to the Zohour hospital."

Hassem Mamdouh, a quietly spoken computer programmer who had been about to leave the sit-in by taxi when the attack started at 3.30am, also reported being targeted by army snipers – despite being comparatively far from the clashes. "They started to shoot at us who were standing further away," said Mamdouh, who spent most of the streetfight wiping people's faces with Pepsi, a makeshift teargas antidote. "I managed to duck down, but one person who was with us was shot because he did not take cover in time."

Down near the bottom of Tayaran Street, Dr Khaled Abdel Latif – on leave from his day job as a surgeon at Zagazig hospital – had set up another tiny field hospital, in which three people died that day. Latif noted repeated abuse by the military and police, saying that officers made several attempts to storm the tent, that the overwhelming teargas in the area had made treatment at times impossible. As Latif finally left the tent at 7am – leaving behind one old man trying to resuscitate the body of his friend – police arrested his colleague Ashraf as he treated a patient. "You either come with me, or I shoot you," the arrested doctor was told.

A man and woman weep as she holds a child's hand after seeing the body of a family member, killed in the attack on pro-Morsi sit-in. Photograph: Ed Giles/Getty Images

7am The battle is over

Fighting eventually stopped at around 7am, three-and-a-half hours – and 54 deaths – later. But the killings did not end there. On Wednesday at 6am, the body of 37-year-old Farid Shawky, an engineer from Hurghada, was found dumped at the bottom of Tayaran Street. His body showed evidence of torture – electric shock marks on his nipples, wrists and ankles, and heavy bruising on his shoulders.

Adly Mansour, Egypt's interim president, announced a judicial investigation into the killings, though previous inquiries have shown that the army is unwilling to submit itself to outside scrutiny. The military has been reluctant to give a full account of the incident. There is also a striking absence of critical reporting on it by Egyptian state and independent media, while pro-Brotherhood TV channels have been shut down.

In a highly charged and polarised political atmosphere, where there is widespread feeling that the Brotherhood has received its comeuppance and the military is immune from civil prosecution, there is growing outrage among the victims that the truth will never come out.

"I want to emphasise that this is a massacre," said Zeid at the Rabaa field hospital this week. "Everyone we received had the same story. It's impossible for them to agree to the same lie."

Nursing his three gunshot wounds in a hospital in north-east Cairo, Moussa agreed. "If they'd just wanted to break the sit-in, they could have done it in other ways. But they wanted to kill us."