The decision to open exit gates at the Leppings Lane turnstiles was "the right thing to do", a former police inspector told the Hillsborough retrial.
John Bennett said he was "shocked" at the size of the crowd outside the stadium as kick-off approached at the 1989 FA Cup semi-final.
He said it was the only way to "relieve pressure" on the crowd.
Match commander David Duckenfield, 75, denies the gross negligence manslaughter of 95 Liverpool fans.
Mr Bennett, a former officer with South Yorkshire Police, told Preston Crown Court he first became aware of the problems outside the Sheffield Wednesday stadium, when he arrived at the concourse area at the Leppings Lane end at about 14:30 on 15 April.
The match between Liverpool and Nottingham Forest kicked off at 15:00.
He said a member of staff from the club, who was manning exit gate A, was in an "agitated state" because of the busy crowd outside.
Mr Bennett said he sent a radio request for more officers to be sent to that area, before climbing on top of the turnstile wall to see what was happening outside.
He described a "considerable crush, that looked very dangerous".
"I was shocked when I could see the extent of the crowd out there, it was solid full of people," he added.
The witness recalled how some supporters got into the ground by climbing over the wall.
He said the majority were waving what he believed to be their tickets in the air.
Mr Bennett said despite hearing a police officer send a radio request for the gates to be opened, he didn't hear any order given, but added that the crowd outside suddenly reduced very quickly.
Benjamin Myers QC, for the defence, put it to him, "when you got on to the turnstile wall you could see it was bad below and something needed to be done," adding there was "little doubt that opening exit gates A, B and C was necessary to prevent harm to the people below".
Mr Bennett replied: "Yes, it was the only way to relieve the pressure at the front."
The trial continues.