Comrades of two young British soldiers the Real IRA sprayed with bullets comforted their friends and pleaded with them to survive, a double murder trial in Northern Ireland has heard.

Paramedic Thomas McCauley said that the soldier's friends kept encouraging wounded army sapper Mark Quinsey to hold on inside the ambulance from Massereene barracks where the gun attack took place in March 2009.

McCauley described in his statement how he found a soldier being treated just outside the base and of the decision he made to take him to the nearby Antrim Area hospital.

He said that, as a colleague drove the ambulance, he travelled in the back with the sapper and other soldiers, one of whom battled to stem blood from a neck wound. The soldier, he added, also had an army dressing on another wound.

McCauley said that Quinsey's friends kept encouraging him as the ambulance raced to the hospital, where the soldier subsequently died from his wounds.

Earlier, civilian security guard David Sloan, who was working at Massereene barracks, told Antrim crown court that he had been in the guardroom at the barracks when the attack began.

When describing the shooting, Paul Ramsey QC put it to Sloan: "Was it pandemonium at this stage?" Sloan replied: "Yes."

On day three of the trial of Colin Duffy and Brian Shivers, who are charged with the killings, Barry McDonald QC, the defence counsel for Duffy, asked Sloan if he had been able to discern how many people were in the back seat of the car believed to have been the getaway vehicle used by the gunmen. Sloan said he had not.

The two men from Lurgan and Co Derry deny murdering Sappers Patrick Azimkar, 21, and Mark Quinsey, 23, outside the Antrim base.

Duffy and Shivers also deny six charges of attempted murder and one of possession of guns and explosives.

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.