A former SAS soldier illegally sent Ben Roberts-Smith confidential information from an Australian military inquiry that he warned the war veteran was a witch hunt he should prepare for.
The former patrol commander codenamed Person Five in the Federal Court on Thursday was granted a certificate of immunity to speak about an offence he committed under Australian law in June 2018.
From the United States Person Five emailed the Victoria Cross recipient detailed information about evidence he gave to the Inspector-General of the Australian Defence Force.
"I wanted to complain about the treatment and that was the avenue I took," he said.
The former Royal Marine said he was seeking legal advice and representation at the time, after attending an interview with the IGADF in May.
Soon after he spoke to his friend and former second-in-command.
"I told him to prepare himself, it was a witch hunt."
He said it looked like another comrade who has given evidence in the trial, Person 18, had been "dragged in as well".
The witness was asked under cross-examination if security was needed during his interview "in case you got violent or walked out?"
"Yeah they said they were scared," but he didn't know why, he said.
Mr Roberts-Smith is suing for defamation The Age, The Sydney Morning Herald over reports claiming he committed war crimes in Afghanistan including murder, and acts of bullying and domestic violence.
The 43-year-old denies all claims of wrongdoing, while the mastheads are defending them as true.
Person Five said he discovered "on Tuesday" that his legal fees were paid for by Seven Network, and had never made any inquiries as to rates, bills, or estimates of costs.
He left $100,000 in an Australian bank account to cover them, he said.
Person Five denied colluding with the former SAS corporal about the story they would tell about a mission dubbed Whiskey 108.
The newspapers have alleged Person Five ordered a young trooper to execute an unarmed prisoner in order to "blood the rookie," to get his first kill in action.
"We don't blood people, I thought I made that perfectly clear," he said.
Nicholas Owens SC submitted that he was giving favourable evidence on behalf of Mr Roberts-Smith to lessen his chance of later being charged with the war crime of murder.
"Not at all," Person Five replied.
He also disputed being in court to ensure Mr Roberts-Smith "doesn't turn against you".
The former elite soldier described extensive documentation following the 2010 battle of Tizak for which Mr Roberts-Smith was awarded the VC.
The "after action report" was viewed by all troop members and was revised up to seven times to ensure everyone agreed the details were correct, he said.
The former patrol commander says the fog of war and personnel in different locations led to different angles and ideas of what occurred.
He recalled an Australian general attended after hearing about the extensive onslaught the SAS soldiers had fought through, and said: "What the f*** were you thinking"?
"Doing my job," he recollected responding.
Following Mr Roberts-Smith's award of the highest honour, media articles surfaced of alleged bullying almost immediately, he said.
Person Four earlier told the court the battle of Tizak where he fought alongside Mr Roberts-Smith was the "highlight of my professional career" with both soldiers' performance equally outstanding.
But he felt the award was later politicised for a good news story.
Another soldier dubbed Person Seven has testified he believed Mr Roberts-Smith's VC citation for his actions at Tizak contained "lies and embellishments".
Mr Roberts-Smith's legal counsel have argued Person Seven's and a handful of other "bitter" claims stem from jealous associates spiteful that he is one of few Australian recipients of the VC since 1970.
The trial continues.