Sheffield Wednesday’s CCTV engineer on the day of the Hillsborough disaster in 1989 has told a court he is now “ashamed” that his first reaction to the unfolding disaster was to think Liverpool supporters were invading the pitch.

Roger Houldsworth, the technical director of the camera and security systems at Sheffield Wednesday’s stadium, broke down in the witness box before recalling that once he realised it was not a pitch invasion, he tried to help people who had been injured in the crush, which led to 96 deaths.

Houldsworth was giving evidence in the prosecution of the former South Yorkshire police chief superintendent David Duckenfield, who was the match commander for the FA Cup semi-final between Liverpool and Nottingham Forest on 15 April 1989. Duckenfield is accused of gross negligence manslaughter relating to 95 of the people who were killed.

Graham Mackrell, who was Sheffield Wednesday’s secretary and safety officer at the time, is standing trial alongside Duckenfield at Preston crown court, charged with two criminal breaches of safety legislation.

Houldsworth told the court that from 2.30pm on the day of the semi-final, he could see on the monitors in the stadium control room that there was an “abnormal” buildup of people outside the turnstiles to the Leppings Lane terrace, which was allocated to Liverpool supporters. Insufficient numbers of people were getting through the seven turnstiles, which the court has heard were used to process all 10,100 Liverpool supporters with tickets to stand.

Houldsworth said that in the control room, which was also staffed by Sheffield Wednesday’s head of security, Douglas Lock, and a South Yorkshire police constable, Harold Guest, he believed “there was absolutely no chance” that those waiting would be inside the ground by the 3pm kick-off time.

The jury of six men and six women has already heard that the kick-off was not delayed, and that at 2.48pm and again at 2.52pm a large number of Liverpool supporters were allowed in together by the opening of a wide exit gate, C. Asked by Richard Matthews QC, the lead barrister for the Crown Prosecution Service, about his reaction when he saw the gate opened, Houldsworth replied: “The first reaction was: ‘Oh my God!’ Then PC Guest and myself said: ‘I hope they’ve blocked off the walkway down to the pens.’”

Houldsworth said that at big matches with large crowds, the walkway, or tunnel, leading to the central “pens” of the Leppings Lane terrace would be closed off by police or stewards when they were full. Later, he said he believed he had seen the tunnel closed off, with two metal barriers, at one match, between Sheffield Wednesday and Manchester United.

However, he recalled that Guest “heard no command” for the tunnel to be blocked off. The jury has already heard that the tunnel was not closed after gate C was opened, and that many of the incoming people did go down the tunnel and into pens three and four, where the lethal crush took place.

Houldsworth said that when he saw the first signs of the disaster, including people climbing over the fence at the front of the pens, he left the club control room and went down to the side of the pitch. Asked by Matthews about his reaction to the sight that confronted him, Houldsworth replied in a quiet voice: “My immediate thought, I must admit … ” before breaking down and becoming emotional.

Watched by the judge, Sir Peter Openshaw, Houldsworth gathered himself, took a sip of water, and continued: “I am rather ashamed now to think [my reaction was] it was a pitch invasion. That was my first thought.”

He recalled then hearing a police officer shouting that people were injured, and said he then went on to the pitch and did what he could to help people. He said he helped a young boy who could not find his brother, and that when they had found him, he was able to help them call their parents because his then fiancee was the club receptionist.

“I thought: I can alleviate somebody’s pain,” Houldsworth said

Both Mackrell and Duckenfield, who were sitting in the body of the court with their lawyers, not in the dock, have pleaded not guilty to the charges.

The trial continues.