After yet another fierce, 45-minute gun battle, Majdi Abed Rabbo was ordered once again to negotiate his perilous way across the already badly-damaged roof of his house, through the jagged gap in the wall and slowly down the stairs towards the first-floor apartment in the rubble-strewn house next door. Not knowing if the men were dead or alive, he shouted for the second time that day: "I'm Majdi. Don't be afraid."

All three men – with Kalashnikov AK-47 rifles, wearing camouflage and headbands bearing the insignia of the Izzedine el Qassam brigades – were still alive, though one was badly injured and persuaded Mr Abed Rabbo to tighten the improvised bandage round his right arm. The youngest – perhaps 21 – was taking cover behind fallen masonry from where he could see the Israeli troops who had sent the visitor. Nervously, Mr Abed Rabbo told them: "They sent me back so I can take your weapons. They told me you are dead." It was the youngest who replied defiantly: "Tell the officer, 'If you're a man come up here'."

When the soldiers had arrived at about 10am, Mr Abed Rabbo, 40, had no inkling that over the next 24 hours he would make four heart-stopping trips, shuttling across increasingly dangerous terrain between the Israeli forces and the three besieged but determined Hamas militants who had become his unwelcome next-door neighbours. He would recall every detail of an episode which, in the telling, resembles the more melodramatic kind of war movie, but which was all too real for a man who by the end had lost his house and thought (wrongly) that his wife and children were dead. He had also witnessed at too close quarters the last stand of the men from the Qassam brigades in the face of relentless Israeli ground attacks and Apache helicopter fire.

Download the new Independent Premium app Sharing the full story, not just the headlines

Civilians were not killed in this episode, as they were in all too many during Operation Cast Lead. Instead, it offers a rare and detailed glimpse of an actual engagement between the Israeli military and Hamas fighters. And while it helps to reinforce Israel's contention that Hamas operates in built-up civilian areas, it also suggests that its own commanders were prepared to use civilians as human shields to protect Israeli troops.

It is one man's version of what happened, of course. But as the soldiers would find out when they checked later, Mr Abed Rabbo is a former member of the Fatah-dominated intelligence, still being paid by the Palestinian Authority in Ramallah. He believes the Hamas gunmen had no right to be in the house next door. But he also strongly objects to the use made of him by the Israeli military. "I could have been killed," he explained.

The soldiers arrived on 5 January, the second day of their ground offensive, with a Palestinian he knew only by his family name of Daher. After telling him to remove his trousers and roll up his shirt to establish he had no weapons, the soldiers told him to bring out his wife, Wijdan, 39, and family. Then, with Mr Abed Rabbo escorted at gunpoint by three soldiers and his family still in the yard, the troops searched his house up to the roof. The Arabic-speaking soldier assigned to Mr Abed Rabbo then asked him about the house next door. He told them he thought there was no one in the property. Then, he said, one of the soldiers brought a sledgehammer with which Mr Abed Rabbo was told to smash a hole in the wall between the two roofs, each opening to the apartments below.

An officer arrived and ordered a search of the house next door. The officer went first, stepping cautiously sideways down the stairs with his M16 rifle pointing downwards, then Mr Abed Rabbo with the soldiers and their guns pointed at his back. Suddenly, the officer turned and started screaming at his men. "We went back upstairs. The soldiers were pulling me and I fell twice," Mr Abed Rabbo said. "We went back to the roof of my house." It became apparent what the officer had glimpsed when suddenly the soldiers, by now on high alert and outside the yard of Mr Abed Rabbo's house, came under fire. He was taken into a mosque, which was already full of soldiers, across the road, then handcuffed and told to sit. After a 15-minute silence, the Hamas militants opened fire again. "The soldiers took position at the windows of the mosque and started shooting back. I was screaming at the soldier who spoke Arabic, 'My wife and children are in danger'." Mr Abed Rabbo said he was then told "shut up or I'll shoot you". "I collapsed and started to cry," he added. "I felt my family was dead."

He remained in custody for the next two days, sometimes handcuffed, staying with the Israeli unit as it moved through the area, often amid heavy exchanges of fire. Once, he was told to open the doors of two cars at another house to check them, before summoning the female occupants of the house downstairs. Then, in the afternoon, he was ordered to visit the damaged building where the armed Hamas men were. "I said I will not go. Maybe they will shoot me. I have a wife. I have kids," he recalled. But, he added, the Israeli officer told him he had "fired 10 rockets and killed them". He was then told to go into the house and bring out the weapons, after being hit with a rifle butt and given a kicking to reinforce the order. "I went to my house and saw my family was not there. I looked to see if there was any blood but there was nothing. It was empty. As I went down the stairs I was calling 'I'm Majdi' so they would not think I was Israeli and shoot me." Approaching the apartment door, he saw one gunman, his AK-47 pointed out, standing guard in the hall with two others behind him. Staying at the doorway, he told them the Israelis believed they had been killed. "They asked me where the army was and I said, 'They're everywhere'," he added. "They asked me to leave."

The soldiers, concealed behind the wall of a house 100 metres away, told him to strip naked to show he had not concealed any weapons as he left the house. Later, he was asked to make a third trip – his second journey alone – to the gunmen's redoubt. Mr Abed Rabbo says the Israeli officer cursed and hit him when he heard his report. Shortly afterwards, an Apache helicopter fired three missiles which he says "destroyed" the house containing the gunmen.

Night had fallen when he set out yet again under orders from the troops, but Mr Abed Rabbo persuaded them that the route through the rubble on his roof was impassable in the dark. "I kept asking about my family and they kept saying 'they're OK, they're OK'." The gunmen, incredibly still alive, opened fire yet again.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

Mr Abed Rabbo was then taken to another house and told to stay there, handcuffed, cold and "worried about my family, my house". The Israeli soldiers came to fetch him again at about 6.30am, assuring him "we killed them last night" and telling him to go and see. "I said, 'How can I go? My rooftop is destroyed. It is very dangerous'," Mr Abed Rabbo explained. But given no choice, he managed to reach the stairs and descending cautiously, calling out as he had done twice before. "I saw everything was destroyed. They were all injured but the one who had been bleeding was worst. He was holding his finger up and saying, 'There is no God but Allah'. One of them was lying under rubble but still alive. The one in better condition said there was no way they would surrender, they would become martyrs. One gave me his name and told me to give a message to his family."

Mr Abed Rabbo said the Israelis started shooting while he was there and he ran away. "I went back to the Army. I lied to them. I said, 'They said if I went back they would kill me'."

The Israeli troops now used a megaphone to tell the gunmen in Arabic: "You have families. Come out and we will take you to hospital and take care of you. [The] district is full of special forces. All the Hamas leaders are hiding underground."

According to Mr Abed Rabbo: "While they were talking like this the [Hamas men] opened fire again, the officer pushed me against a wall and said, 'You've been lying to me. There are more than three in there'."

The soldiers then ordered two other residents to take cameras into the house to photograph it and the Hamas fighters. Next, the army sent in a dog which returned injured and died soon afterwards. The gunmen were then told: "You have 15 minutes to come out with no clothes on and with your hands up. If you don't, we will bring the house down on you."

After 15 minutes, Mr Abed Rabbo said, a bulldozer moved into the area between the houses and the mosque, destroying large parts of his house before systematically demolishing the one the gunmen were hiding in. It was now Tuesday afternoon.

Before he was taken away, Mr Abed Rabbo had a clear view of his wrecked house, the pulverised property next door, and the bodies of the three Hamas gunmen lying in the rubble.