The soldier, identified only as T, said it was 'not true' that his attitude was 'whatever you do with prison warders, one doesn't monkey around with the SAS'.
He was being cross-examined by Lionel Daiches, QC, on the third day of a pounds 30,000 damages claim by a prisoner, John Devine, 32, against Ian Lang, the Secretary of State for Scotland, at the Court of Session in Edinburgh.
Mr Devine claims that he was illegally beaten by SAS soldiers when they ended the siege at Peterhead prison in October 1987.
Two prison officers were taken hostage. One was released after suffering a broken ankle and the other was held for more than 100 hours.
Court 8 was divided by a 7ft high screen to protect the identity of Soldier T, who told the court he was trained to deal with counter-terrorist incidents and in particular the release of hostages.
He and other SAS members arrived at Peterhead prison on 2 October 1987. Three prisoners were holding Jackie Stuart, a warder, hostage in D Hall. The soldiers were warned that the prisoners were dangerous and were shown pictures of them.
Soldier T said they were then provided with batons, gas and 'flash-bang' grenades. It was agreed that he and six others should go through a hatch in the roof of D Hall.
It was about 3am and still dark. They were near to the hatch when prisoners spotted them. The SAS men were 'compromised', Soldier T told Alastair Dunlop QC, for the Secretary of State.
They then received the order to go in and dropped two 'flash-bangs' through the hatch.
Soldier T entered first. It was dark inside but he had a torch. 'As I entered the attic space I came across the prison warder. I moved towards him and checked he was OK and he was just passed behind me to the next person.'
Almost instantly he saw one of the prisoners coming towards him, apparently with a knife. 'I moved towards him and struck his forearm and then struck up towards his face. The first blow was to try to disarm him and the second was to enable me to move closer and grab him and put him off balance. He was then turned round and pushed towards what I thought was a wall.'
He denied striking the prisoner about the head with a baton at any other stage and said the prisoner was not thrown 12 feet from the attic to the gallery below.
Cross-examined by Mr Daiches, the soldier denied saying or hearing his colleagues say to their prisoner: 'You're going for a spin, pal.'
Mr Daiches asked: 'Weren't you absolutely certain you were going to teach him a lesson, the sort he would remember?'
Soldier T replied: 'No.'
When Mr Daiches suggested that Mr Devine's head was 'being burst open' when he was not opposing the SAS in any way, the soldier said: 'That is not true.'
The case continues on Tuesday.Reuse content